diff --git a/mini-beieli-node.ino b/mini-beieli-node.ino index e3b58ea..c7662a0 100644 --- a/mini-beieli-node.ino +++ b/mini-beieli-node.ino @@ -688,7 +688,8 @@ void StartNewIteration() { gCatena.SafePrintf("startSendingUplink(), my_position: %d, iteration: %d, package_counter: %d, big_difference: %d\n", my_position, iteration, package_counter, big_difference); } // the first packets are "Init-Packets" or each INIT_PACKAGE_INTERVAL ... - startSendingUplink(next_package_is_init_package, big_difference); + // send confirmed if Init-Packet or big_difference in weight + startSendingUplink(next_package_is_init_package, big_difference || next_package_is_init_package); next_package_is_init_package = ((iteration < INIT_PACKETS) || ((package_counter % INIT_PACKAGE_INTERVAL) == 0)); if (config_data.debug_level > 1) { @@ -730,6 +731,9 @@ void StartNewIteration() { if (not(next_package_is_init_package)) { // we make the current sensor reading to the last one... last_sensor_reading = current_sensor_reading; + } else { + // we only copy the last weight + last_sensor_reading.weight = current_sensor_reading.weight; } uint32_t sleep_time_sec;