bug fix
This commit is contained in:
parent
0c553eed56
commit
3cf651b338
|
|
@ -682,7 +682,7 @@ void StartNewIteration() {
|
|||
// or when the weight has fallen more than threshold or the first measurement is
|
||||
// more than one hour old (which should not happen :-) )
|
||||
bool big_difference = (abs(last_sensor_reading.weight - current_sensor_reading.weight) > SEND_DIFF_THRESHOLD_5GRAMS);
|
||||
if ( (next_package_is_init_package) || (my_position >= MAX_VALUES_TO_SEND) || ((my_position > 1) && big_difference) || ((millis() - timer_pos0) > 3600000)) {
|
||||
if ( (next_package_is_init_package) || (my_position >= MAX_VALUES_TO_SEND) || (big_difference) || ((millis() - timer_pos0) > 3600000)) {
|
||||
lora_data.offset_last_reading = (uint8_t)((millis() - timer_pos0) / 1000 / 60);
|
||||
if (config_data.debug_level > 0) {
|
||||
gCatena.SafePrintf("startSendingUplink(), my_position: %d, iteration: %d, package_counter: %d, big_difference: %d\n", my_position, iteration, package_counter, big_difference);
|
||||
|
|
|
|||
Loading…
Reference in New Issue