@@ -112,14 +112,24 @@ void beepOn()
112
112
{
113
113
// Disallow beeper if setting is turned off
114
114
if ((pin_beeper != PIN_UNDEFINED) && (settings.enableBeeper == true ))
115
- digitalWrite (pin_beeper, HIGH);
115
+ {
116
+ if (productVariant == RTK_TORCH)
117
+ digitalWrite (pin_beeper, HIGH);
118
+ else if (productVariant == RTK_FLEX)
119
+ tone (pin_beeper, 523 ); // NOTE_C5
120
+ }
116
121
}
117
122
118
123
void beepOff ()
119
124
{
120
125
// Disallow beeper if setting is turned off
121
126
if ((pin_beeper != PIN_UNDEFINED) && (settings.enableBeeper == true ))
122
- digitalWrite (pin_beeper, LOW);
127
+ {
128
+ if (productVariant == RTK_TORCH)
129
+ digitalWrite (pin_beeper, LOW);
130
+ else if (productVariant == RTK_FLEX)
131
+ noTone (pin_beeper);
132
+ }
123
133
}
124
134
125
135
// Only useful for pin_chargerLED on Facet mosaic
@@ -895,13 +905,13 @@ void beginGpioExpanderSwitches()
895
905
// PWRKILL is on pin 7. Driving it low will turn off the system
896
906
for (int i = 0 ; i < 8 ; i++)
897
907
{
898
- // Set all pins to low expect GNSS RESET and PWRKILL
908
+ // Set all pins to low expect GNSS RESET and PWRKILL
899
909
if (i == 5 || i == 7 )
900
910
gpioExpanderSwitches->digitalWrite (i, HIGH);
901
911
else
902
912
gpioExpanderSwitches->digitalWrite (i, LOW);
903
913
904
- gpioExpanderSwitches->pinMode (i, OUTPUT);
914
+ gpioExpanderSwitches->pinMode (i, OUTPUT);
905
915
}
906
916
907
917
online.gpioExpanderSwitches = true ;
@@ -938,8 +948,47 @@ void gpioExpanderSelectImu()
938
948
gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_S3, LOW);
939
949
}
940
950
941
- void gpioExpanderSelectLora ()
951
+ // Connect ESP32 UART2 to LoRa UART2 for configuration and bootloading/firmware updates
952
+ void gpioExpanderSelectLoraConfigure ()
942
953
{
943
954
if (online.gpioExpanderSwitches == true )
944
955
gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_S3, HIGH);
956
+ }
957
+
958
+ // Connect Flex GNSS UART2 to LoRa UART0 for normal TX/RX of corrections and data
959
+ void gpioExpanderSelectLoraCommunication ()
960
+ {
961
+ if (online.gpioExpanderSwitches == true )
962
+ gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_S4, HIGH);
963
+ }
964
+
965
+ // Drive GPIO pin high to enable LoRa Radio
966
+ void gpioExpanderEnableLora ()
967
+ {
968
+ if (online.gpioExpanderSwitches == true )
969
+ gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_LoraEnable, HIGH);
970
+ }
971
+ void gpioExpanderDisableLora ()
972
+ {
973
+ if (online.gpioExpanderSwitches == true )
974
+ gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_LoraEnable, LOW);
975
+ }
976
+ bool gpioExpanderLoraIsOn ()
977
+ {
978
+ if (online.gpioExpanderSwitches == true )
979
+ {
980
+ if (gpioExpanderSwitches->digitalRead (gpioExpanderSwitch_LoraEnable) == HIGH)
981
+ return (true );
982
+ }
983
+ return (false );
984
+ }
985
+ void gpioExpanderEnableLoraBoot ()
986
+ {
987
+ if (online.gpioExpanderSwitches == true )
988
+ gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_LoraBoot, HIGH);
989
+ }
990
+ void gpioExpanderDisableLoraBoot ()
991
+ {
992
+ if (online.gpioExpanderSwitches == true )
993
+ gpioExpanderSwitches->digitalWrite (gpioExpanderSwitch_LoraBoot, LOW);
945
994
}
0 commit comments