small change with confirmed logic, FW-Version 20240624
This commit is contained in:
parent
ec7a10f5ff
commit
111fd2cd52
|
|
@ -12,7 +12,7 @@ BME280 bme280;
|
|||
/******************************************************************************/
|
||||
/* Firmware Version */
|
||||
/******************************************************************************/
|
||||
static const int32_t fwVersion = 20240622;
|
||||
static const int32_t fwVersion = 20240624;
|
||||
|
||||
/******************************************************************************/
|
||||
/* LoraWAN Settings */
|
||||
|
|
@ -226,6 +226,7 @@ bool start_new_iteration = false;
|
|||
bool next_package_is_init_package = true;
|
||||
uint32_t gRebootMs;
|
||||
char last_channel = 'X';
|
||||
bool toobigweightchange = false;
|
||||
|
||||
/******************************************************************************/
|
||||
/* Functions for Global Data Structures */
|
||||
|
|
@ -879,6 +880,7 @@ bool TooBigWeightChange()
|
|||
Serial.printf("TooBigWeightChange (my_position: %d): %d...\n", my_position, big_difference);
|
||||
}
|
||||
|
||||
toobigweightchange = big_difference;
|
||||
return big_difference;
|
||||
}
|
||||
|
||||
|
|
@ -980,7 +982,7 @@ void loop()
|
|||
{
|
||||
if (ReadSensors(false)) {
|
||||
// we send confirmed packages when weight change is too big or for every init package
|
||||
isTxConfirmed = (TooBigWeightChange()) || (iteration <= INIT_PACKETS) || (iteration % INIT_PACKAGE_INTERVAL == 0);
|
||||
isTxConfirmed = (toobigweightchange) || (iteration <= INIT_PACKETS) || (iteration % INIT_PACKAGE_INTERVAL == 0);
|
||||
prepareTxFrame(appPort);
|
||||
LoRaWAN.send();
|
||||
package_counter++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue