parent
68fee9905f
commit
d7778b258d
|
@ -284,8 +284,7 @@ int sent_channel::GetMsg(uint32_t* rx) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sent_channel::GetSignals(uint8_t *pStat, uint16_t *pSig0, uint16_t *pSig1)
|
int sent_channel::GetSignals(uint8_t *pStat, uint16_t *pSig0, uint16_t *pSig1) {
|
||||||
{
|
|
||||||
uint32_t rx;
|
uint32_t rx;
|
||||||
int ret = GetMsg(&rx);
|
int ret = GetMsg(&rx);
|
||||||
|
|
||||||
|
@ -594,7 +593,8 @@ static void printSentInfo() {
|
||||||
for (int i = 0; i < SENT_CHANNELS_NUM; i++) {
|
for (int i = 0; i < SENT_CHANNELS_NUM; i++) {
|
||||||
sent_channel &ch = channels[i];
|
sent_channel &ch = channels[i];
|
||||||
|
|
||||||
efiPrintf("---- SENT ch %d ----", i);
|
const char * pinName = getBoardSpecificPinName(engineConfiguration->sentInputPins[i]);
|
||||||
|
efiPrintf("---- SENT ch %d ---- on %s", i, pinName);
|
||||||
ch.Info();
|
ch.Info();
|
||||||
efiPrintf("--------------------");
|
efiPrintf("--------------------");
|
||||||
}
|
}
|
||||||
|
@ -630,8 +630,7 @@ int getSentValues(size_t index, uint16_t *sig0, uint16_t *sig1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should be called once */
|
/* Should be called once */
|
||||||
void initSent(void)
|
void initSent(void) {
|
||||||
{
|
|
||||||
/* init interval mailbox */
|
/* init interval mailbox */
|
||||||
chMBObjectInit(&sent_mb, sent_mb_buffer, SENT_MB_SIZE);
|
chMBObjectInit(&sent_mb, sent_mb_buffer, SENT_MB_SIZE);
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,7 @@ static ICUConfig icucfg[SENT_INPUT_COUNT] =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void startSent()
|
void startSent() {
|
||||||
{
|
|
||||||
for (int i = 0; i < SENT_INPUT_COUNT; i++) {
|
for (int i = 0; i < SENT_INPUT_COUNT; i++) {
|
||||||
brain_input_pin_e sentPin = engineConfiguration->sentInputPins[i];
|
brain_input_pin_e sentPin = engineConfiguration->sentInputPins[i];
|
||||||
|
|
||||||
|
@ -63,7 +62,7 @@ void startSent()
|
||||||
|
|
||||||
if (getIcuParams(sentPin, &pinAF, &icu, &cfg->channel, &baseClock) != true) {
|
if (getIcuParams(sentPin, &pinAF, &icu, &cfg->channel, &baseClock) != true) {
|
||||||
/* this pin has no ICU functionality, of ICU driver is not enabled for TIM on this pin */
|
/* this pin has no ICU functionality, of ICU driver is not enabled for TIM on this pin */
|
||||||
/* throw error? */
|
firmwareError(OBD_PCM_Processor_Fault, "No ICU on selected SENT pin");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,8 +74,7 @@ void startSent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopSent()
|
void stopSent() {
|
||||||
{
|
|
||||||
for (int i = 0; i < SENT_INPUT_COUNT; i++) {
|
for (int i = 0; i < SENT_INPUT_COUNT; i++) {
|
||||||
brain_input_pin_e sentPin = activeConfiguration.sentInputPins[i];
|
brain_input_pin_e sentPin = activeConfiguration.sentInputPins[i];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue