added CAN-Debug-Message

This commit is contained in:
2023-09-25 07:21:33 +02:00
parent ce9f1a2306
commit c42de4b24c
5 changed files with 86 additions and 21 deletions

View File

@@ -96,31 +96,19 @@ void setup()
#endif
leds.begin();
Serial.print("\nLED-Init done");
switch (LubeConfig.SpeedSource)
{
case SOURCE_IMPULSE:
pinMode(GPIO_TRIGGER, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(GPIO_TRIGGER), trigger_ISR, FALLING);
break;
#ifdef FEATURE_ENABLE_GPS
case SOURCE_GPS:
Init_GPS();
break;
#endif
#ifdef FEATURE_ENABLE_TIMER
case SOURCE_TIME:
break;
pinMode(GPIO_TRIGGER, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(GPIO_TRIGGER), trigger_ISR, FALLING);
Serial.print("\nPulse-Input Init done");
#ifdef FEATURE_ENABLE_GPS
Init_GPS();
Serial.print("\nGPS-Init done");
#endif
#ifdef FEATURE_ENABLE_CAN
case SOURCE_CAN:
Init_CAN();
break;
Init_CAN();
Serial.print("\nCAN-Init done");
#endif
default:
Debug_pushMessage("Source Setting N/A");
break;
}
Serial.print("\nSource-Init done");
pinMode(GPIO_BUTTON, INPUT_PULLUP);
pinMode(GPIO_PUMP, OUTPUT);
@@ -193,6 +181,9 @@ void loop()
RunLubeApp(wheelDistance);
#ifdef FEATURE_ENABLE_OLED
Display_Process();
#endif
#ifdef FEATURE_ENABLE_CAN
CAN_Process();
#endif
Button_Process();
LED_Process();