2 Commits
Author SHA1 Message Date
jlehmann 038a7a1215 fix README 2024-06-24 18:14:54 +02:00
jlehmann 111fd2cd52 small change with confirmed logic, FW-Version 20240624 2024-06-24 18:10:17 +02:00
2 changed files with 5 additions and 3 deletions
@@ -12,7 +12,7 @@ BME280 bme280;
/******************************************************************************/ /******************************************************************************/
/* Firmware Version */ /* Firmware Version */
/******************************************************************************/ /******************************************************************************/
static const int32_t fwVersion = 20240622; static const int32_t fwVersion = 20240624;
/******************************************************************************/ /******************************************************************************/
/* LoraWAN Settings */ /* LoraWAN Settings */
@@ -226,6 +226,7 @@ bool start_new_iteration = false;
bool next_package_is_init_package = true; bool next_package_is_init_package = true;
uint32_t gRebootMs; uint32_t gRebootMs;
char last_channel = 'X'; char last_channel = 'X';
bool toobigweightchange = false;
/******************************************************************************/ /******************************************************************************/
/* Functions for Global Data Structures */ /* Functions for Global Data Structures */
@@ -879,6 +880,7 @@ bool TooBigWeightChange()
Serial.printf("TooBigWeightChange (my_position: %d): %d...\n", my_position, big_difference); Serial.printf("TooBigWeightChange (my_position: %d): %d...\n", my_position, big_difference);
} }
toobigweightchange = big_difference;
return big_difference; return big_difference;
} }
@@ -980,7 +982,7 @@ void loop()
{ {
if (ReadSensors(false)) { if (ReadSensors(false)) {
// we send confirmed packages when weight change is too big or for every init package // 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); prepareTxFrame(appPort);
LoRaWAN.send(); LoRaWAN.send();
package_counter++; package_counter++;
+1 -1
View File
@@ -87,7 +87,7 @@ $ mkdir -p cyacd/20211228
$ cp /private/var/folders/n6/jjw6yp4s2dz0sd76rz3k7mzm0000gn/T/arduino-sketch-97CDDDDD36F10A320334F076837B4C34/CubeCell_Board_REGION_EU868_RGB_0.cyacd cyacd/20211228 $ cp /private/var/folders/n6/jjw6yp4s2dz0sd76rz3k7mzm0000gn/T/arduino-sketch-97CDDDDD36F10A320334F076837B4C34/CubeCell_Board_REGION_EU868_RGB_0.cyacd cyacd/20211228
Alternative zum Upload der Firmware: Alternative zum Upload der Firmware:
$ /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash -serial /dev/tty.usbserial-0001 cyacd/20220930/CubeCell_Board_REGION_EU868_RGB_0.cyacd $ /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash -serial /dev/tty.usbserial-0001 cyacd/20240624/CubeCell_Board_REGION_EU868_RGB_0.cyacd
USB-Device kann am einfachsten wie folgt bestimmt werden: USB-Device kann am einfachsten wie folgt bestimmt werden: