Browse Source

Zeitintervall erkennen

master
Ralf Behrens 4 years ago
parent
commit
d4716ae10d
  1. 7
      src/main.cpp

7
src/main.cpp

@ -68,6 +68,8 @@ static osjob_t sendjob;
// cycle limitations). // cycle limitations).
const unsigned TX_INTERVAL = 600; const unsigned TX_INTERVAL = 600;
uint8_t WasTustDu;
// Pin mapping // Pin mapping
// //
// Adafruit BSPs are not consistent -- m0 express defs ARDUINO_SAMD_FEATHER_M0, // Adafruit BSPs are not consistent -- m0 express defs ARDUINO_SAMD_FEATHER_M0,
@ -135,6 +137,7 @@ void do_send(__attribute__((unused)) osjob_t *j) {
} else { } else {
// Prepare upstream data transmission at the next possible time. // Prepare upstream data transmission at the next possible time.
MessenSensoren(); MessenSensoren();
WasTustDu=0;
uint8_t *buffer = hse.getBuffer(); uint8_t *buffer = hse.getBuffer();
int size = hse.getSize(); int size = hse.getSize();
@ -227,6 +230,9 @@ void onEvent(ev_t ev) {
} }
// Schedule next transmission // Schedule next transmission
os_setTimedCallback(&sendjob, os_getTime() + sec2osticks(TX_INTERVAL), do_send); os_setTimedCallback(&sendjob, os_getTime() + sec2osticks(TX_INTERVAL), do_send);
Serial1.println(F("WasTustDu="));
Serial1.println(WasTustDu);
WasTustDu++;
PrintTimeDate(); PrintTimeDate();
//Serial1.println(F("vor sleep")); //Serial1.println(F("vor sleep"));
@ -328,7 +334,6 @@ void setup() {
void loop() { void loop() {
os_runloop_once(); os_runloop_once();
//LowPower.sleep(1000);
} }

Loading…
Cancel
Save