sforkowany z mirror/meshtastic-firmware
Merge branch 'master' into master
commit
25072f0637
|
@ -343,7 +343,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 36
|
||||
#define GPS_TX_PIN 39
|
||||
#define GPS_TX_PIN 13
|
||||
|
||||
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
|
||||
|
|
|
@ -87,6 +87,10 @@ void PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength)
|
|||
handleSetRadio(toRadioScratch.set_radio);
|
||||
break;
|
||||
|
||||
case ToRadio_set_channel_tag:
|
||||
DEBUG_MSG("Client is setting channel\n");
|
||||
handleSetChannel(toRadioScratch.set_channel);
|
||||
break;
|
||||
default:
|
||||
DEBUG_MSG("Error: unexpected ToRadio variant\n");
|
||||
break;
|
||||
|
@ -275,6 +279,17 @@ void PhoneAPI::handleSetOwner(const User &o)
|
|||
service.reloadOwner();
|
||||
}
|
||||
|
||||
void PhoneAPI::handleSetChannel(const ChannelSettings &cc)
|
||||
{
|
||||
radioConfig.channel_settings = cc;
|
||||
|
||||
bool didReset = service.reloadConfig();
|
||||
if (didReset) {
|
||||
state = STATE_SEND_MY_INFO; // Squirt a completely new set of configs to the client
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PhoneAPI::handleSetRadio(const RadioConfig &r)
|
||||
{
|
||||
radioConfig = r;
|
||||
|
|
|
@ -88,6 +88,7 @@ class PhoneAPI
|
|||
//
|
||||
|
||||
void handleSetOwner(const User &o);
|
||||
void handleSetChannel(const ChannelSettings &cc);
|
||||
void handleSetRadio(const RadioConfig &r);
|
||||
|
||||
protected:
|
||||
|
|
Ładowanie…
Reference in New Issue