@@ -39,9 +39,7 @@ void CanTxThread(void*)
3939
4040 // EGT - 20 Hz
4141 if ((cycle % 5 ) == 0 ) {
42- for (int ch = 0 ; ch < EGT_CHANNELS ; ch++) {
43- SendCanEgtForChannel (ch);
44- }
42+ SendCanEgt ();
4543 }
4644
4745 cycle++;
@@ -102,56 +100,59 @@ __attribute__((weak)) void SendCanForChannel(uint8_t ch)
102100
103101 switch (configuration->afr [ch].ExtraCanProtocol )
104102 {
105- case CanProtocol ::AemNet:
103+ case CanAfrProtocol ::AemNet:
106104 SendAemNetUEGOFormat (configuration, ch);
107105 break ;
108- case CanProtocol::EcuMasterClassic:
109- case CanProtocol::EcuMasterBlack:
106+ case CanAfrProtocol::EcuMaster:
110107 SendEcuMasterAfrFormat (configuration, ch);
111108 break ;
112- case CanProtocol ::Haltech:
109+ case CanAfrProtocol ::Haltech:
113110 SendHaltechAfrFormat (configuration, ch);
114111 break ;
115- case CanProtocol ::LinkEcu:
112+ case CanAfrProtocol ::LinkEcu:
116113 SendLinkAfrFormat (configuration, ch);
117114 break ;
118- case CanProtocol ::Emtron:
115+ case CanAfrProtocol ::Emtron:
119116 SendEmtronAfrFormat (configuration, ch);
120117 break ;
121- case CanProtocol ::Motec:
118+ case CanAfrProtocol ::Motec:
122119 SendMotecAfrFormat (configuration, ch);
123120 break ;
124121 default :
125122 break ;
126123 }
127124}
128125
129- __attribute__ ((weak)) void SendCanEgtForChannel( uint8_t ch )
126+ __attribute__ ((weak)) void SendCanEgt( )
130127{
131128#if (EGT_CHANNELS > 0)
132129
133- SendRusefiEgtFormat (configuration, ch );
130+ SendRusefiEgtFormat (configuration);
134131
135- switch (configuration->egt [ch].ExtraCanProtocol )
132+ // Look at channel 0 EGT protocol
133+ switch (configuration->egt [0 ].ExtraCanProtocol )
136134 {
137- case CanProtocol::AemNet :
138- SendAemNetEGTFormat (configuration, ch );
135+ case CanEgtProtocol::AemNet0305 :
136+ SendAemNetEGT0305Format (configuration);
139137 break ;
140- case CanProtocol::EcuMasterClassic:
141- case CanProtocol::EcuMasterBlack:
142- SendEcuMasterEgtFormat (configuration, ch);
138+ case CanEgtProtocol::AemNet2224:
139+ SendAemNetEGT2224Format (configuration);
143140 break ;
144- case CanProtocol::Haltech:
145- SendHaltechEgtFormat (configuration, ch);
141+ case CanEgtProtocol::EcuMasterClassic:
142+ case CanEgtProtocol::EcuMasterBlack:
143+ SendEcuMasterEgtFormat (configuration);
146144 break ;
147- case CanProtocol::LinkEcu :
148- SendLinkEgtFormat (configuration, ch );
145+ case CanEgtProtocol::Haltech :
146+ SendHaltechEgtFormat (configuration);
149147 break ;
150- case CanProtocol::Emtron :
151- SendEmtronEgtFormat (configuration, ch );
148+ case CanEgtProtocol::LinkEcu :
149+ SendLinkEgtFormat (configuration);
152150 break ;
153- case CanProtocol::Motec:
154- SendMotec888Format (configuration, ch);
151+ case CanEgtProtocol::Emtron:
152+ SendEmtronEgtFormat (configuration);
153+ break ;
154+ case CanEgtProtocol::Motec:
155+ SendMotec888Format (configuration);
155156 break ;
156157 default :
157158 break ;
0 commit comments