Default to no-ACK. Second button always sends.

pull/6/head
Max-Plastix 2022-01-06 04:53:08 -08:00
rodzic 0b70f07205
commit 2e90f1f617
2 zmienionych plików z 11 dodań i 8 usunięć

Wyświetl plik

@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BATTERY_LOW_VOLTAGE 3.4 // Below this voltage, power off until USB power allows charging
#define LORAWAN_PORT 2 // FPort for Uplink messages -- must match Helium Console Decoder script!
#define LORAWAN_CONFIRMED_EVERY 10 // Send confirmed message for ACK every N messages (0 means never, 1 means always, 2 every-other-one..)
#define LORAWAN_CONFIRMED_EVERY 0 // Send confirmed message for ACK every N messages (0 means never, 1 means always, 2 every-other-one..)
#define LORAWAN_SF DR_SF7 // Spreading factor (recommended DR_SF7 for network map purposes, DR_SF10 is slower/more-reach)
// Uncomment to enable discarding network settings by long pressing second button

Wyświetl plik

@ -852,15 +852,18 @@ void loop() {
}
} else if (pressTime) {
// we just did a release
is_highlighted = false;
if (millis() - pressTime > 1000) {
Serial.println("Long press!");
if (in_menu)
menu_selected();
else {
screen_print("\nSend! ");
justSendNow = true;
}
is_highlighted = false;
if (millis() - pressTime > 1000) {
// Was a long press
} else {
// short press: menu selection
if (in_menu)
menu_selected();
// Serial.println("Short press.");
// Was a short press
}
pressTime = 0; // Released
}