reboot on error

master
Eggert Jung 4 years ago
parent e327e1ab21
commit a250a28cc0

@ -207,7 +207,7 @@ int main()
else
{
printf("--MQTT Connected ERROR: %ld\r\n", mqtt_rc);
//while(1); //Reboot the board
while(1); //Reboot the board
}
// Subscribe to all topics
@ -222,8 +222,6 @@ int main()
uint32_t timer_blink_outs = millis();
uint32_t timer_send_uptime = millis();
OCR3B = 127;
#if PLC_MQTT_ENABLED
mqtt_pub(&mqtt_client, "/Filamentanlage/04_Messmodul/state/Luefter", "aus", 3);
#endif
@ -299,6 +297,7 @@ void timer3_init(void)
TCCR3A |= (1<<WGM30); // PWM Mode with ocra top
TCCR3B |= (1<<WGM33);
OCR3A = TOP_VALUE;
OCR3B = 0;
TCCR3B |= (0<<CS32)|(1<<CS31)|(0<<CS30); // PS 1:1
TCCR3A |= (1<<COM3B1) | (0<<COM3B0);