kopia lustrzana https://github.com/Max-Plastix/tbeam-helium-mapper
Default to no-ACK. Second button always sends.
rodzic
0b70f07205
commit
2e90f1f617
|
@ -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
|
||||
|
|
|
@ -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!");
|
||||
justSendNow = true;
|
||||
} else {
|
||||
// short press: menu selection
|
||||
if (in_menu)
|
||||
menu_selected();
|
||||
// Serial.println("Short press.");
|
||||
else {
|
||||
screen_print("\nSend! ");
|
||||
justSendNow = true;
|
||||
}
|
||||
is_highlighted = false;
|
||||
|
||||
if (millis() - pressTime > 1000) {
|
||||
// Was a long press
|
||||
} else {
|
||||
// Was a short press
|
||||
}
|
||||
pressTime = 0; // Released
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue