code sanitizations
This commit is contained in:
parent
e7a5ab3ca6
commit
bac9540d52
@ -82,7 +82,7 @@ private:
|
|||||||
uint8_t cursor;
|
uint8_t cursor;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "No valid payload converter defined"
|
#error No valid payload converter defined!
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ https://www-user.tu-chemnitz.de/~heha/viewzip.cgi/hs/Funkuhr.zip/
|
|||||||
#ifdef HAS_DCF77
|
#ifdef HAS_DCF77
|
||||||
|
|
||||||
#ifdef IF_482
|
#ifdef IF_482
|
||||||
#error "You must define at most one of IF482 or DCF77"
|
#error You must define at most one of IF482 or DCF77!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "dcf77.h"
|
#include "dcf77.h"
|
||||||
@ -50,9 +50,9 @@ int dcf77_init(void) {
|
|||||||
|
|
||||||
assert(ClockTask); // has clock task started?
|
assert(ClockTask); // has clock task started?
|
||||||
|
|
||||||
timepulse_init(PPS); // setup pulse
|
timepulse_init(PPS); // setup pulse
|
||||||
DCF_Out(sync_clock(now())); // sync DCF time on next second
|
DCF_Out(sync_clock(now())); // sync DCF time on next second
|
||||||
timepulse_start(); // start pulse
|
timepulse_start(); // start pulse
|
||||||
|
|
||||||
return 1; // success
|
return 1; // success
|
||||||
} // ifdcf77_init
|
} // ifdcf77_init
|
||||||
@ -140,9 +140,8 @@ void dcf77_loop(void *pvParameters) {
|
|||||||
vTaskDelayUntil(&wakeTime, pdMS_TO_TICKS(DCF77_PULSE_DURATION));
|
vTaskDelayUntil(&wakeTime, pdMS_TO_TICKS(DCF77_PULSE_DURATION));
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif (PPS < DCF77_PULSE_DURATION) // we need downclocking
|
#elif (PPS < DCF77_PULSE_DURATION) // we need downclocking, not yet implemented
|
||||||
vTaskDelayUntil(&wakeTime, pdMS_TO_TICKS(DCF77_PULSE_DURATION - PPS));
|
#error Timepulse is too low for DCF77!
|
||||||
DCF_Out(0);
|
|
||||||
#endif
|
#endif
|
||||||
} // for
|
} // for
|
||||||
} // dcf77_loop()
|
} // dcf77_loop()
|
||||||
|
@ -80,7 +80,7 @@ not evaluated by model BU-190
|
|||||||
#ifdef HAS_IF482
|
#ifdef HAS_IF482
|
||||||
|
|
||||||
#ifdef HAS_DCF77
|
#ifdef HAS_DCF77
|
||||||
#error "You must define at most one of IF482 or DCF77"
|
#error You must define at most one of IF482 or DCF77!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "if482.h"
|
#include "if482.h"
|
||||||
@ -100,7 +100,6 @@ static const char TAG[] = "main";
|
|||||||
#define PPS IF482_PULSE_DURATION
|
#define PPS IF482_PULSE_DURATION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
HardwareSerial IF482(2); // use UART #2 (note: #1 may be in use for serial GPS)
|
HardwareSerial IF482(2); // use UART #2 (note: #1 may be in use for serial GPS)
|
||||||
|
|
||||||
// initialize and configure IF482 Generator
|
// initialize and configure IF482 Generator
|
||||||
@ -191,10 +190,8 @@ void if482_loop(void *pvParameters) {
|
|||||||
IF482.print(IF482_Out(now() + 1));
|
IF482.print(IF482_Out(now() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif (PPS < IF482_PULSE_DURATION) // we need downclocking
|
#elif (PPS < IF482_PULSE_DURATION) // we need downclocking, not yet implemented
|
||||||
IF482.print(IF482_Out(now() + 1));
|
#error Timepulse is too low for IF482!
|
||||||
vTaskDelayUntil(&wakeTime,
|
|
||||||
shotTime - PPS); // sets waketime to moment of shot
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} // if482_loop()
|
} // if482_loop()
|
||||||
|
@ -437,5 +437,5 @@ void PayloadConvert::addButton(uint8_t value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "No valid payload converter defined"
|
#error No valid payload converter defined!
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user