sforkowany z mirror/meshtastic-firmware
commit
62a8c968e8
|
@ -1,3 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
export VERSION=1.1.6
|
export VERSION=1.1.7
|
Plik binarny nie jest wyświetlany.
File diff suppressed because one or more lines are too long
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 272 KiB |
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 417 KiB |
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
These are **preliminary** notes on support for Meshtastic in the Pinetab.
|
These are **preliminary** notes on support for Meshtastic in the Pinetab.
|
||||||
|
|
||||||
A RF95 is connected via a CS341 USB-SPI chip.
|
A RF95 is connected via a CH341 USB-SPI chip.
|
||||||
|
|
||||||
Pin assignments:
|
Pin assignments:
|
||||||
CS0 from RF95 goes to CS0 on CS341
|
CS0 from RF95 goes to CS0 on CH341
|
||||||
DIO0 from RF95 goes to INT on CS341
|
DIO0 from RF95 goes to INT on CH341
|
||||||
RST from RF95 goes to RST on CS341
|
RST from RF95 goes to RST on CH341
|
||||||
|
|
||||||
This linux driver claims to provide USB-SPI support: https://github.com/gschorcht/spi-ch341-usb
|
This linux driver claims to provide USB-SPI support: https://github.com/gschorcht/spi-ch341-usb
|
||||||
Notes here on using that driver: https://www.linuxquestions.org/questions/linux-hardware-18/ch341-usb-to-spi-adaptor-driver-doesn%27t-work-4175622736/
|
Notes here on using that driver: https://www.linuxquestions.org/questions/linux-hardware-18/ch341-usb-to-spi-adaptor-driver-doesn%27t-work-4175622736/
|
||||||
|
|
|
@ -198,7 +198,10 @@ void MeshService::loop()
|
||||||
bool MeshService::reloadConfig()
|
bool MeshService::reloadConfig()
|
||||||
{
|
{
|
||||||
// If we can successfully set this radio to these settings, save them to disk
|
// If we can successfully set this radio to these settings, save them to disk
|
||||||
|
|
||||||
|
// This will also update the region as needed
|
||||||
bool didReset = nodeDB.resetRadioConfig(); // Don't let the phone send us fatally bad settings
|
bool didReset = nodeDB.resetRadioConfig(); // Don't let the phone send us fatally bad settings
|
||||||
|
|
||||||
configChanged.notifyObservers(NULL);
|
configChanged.notifyObservers(NULL);
|
||||||
nodeDB.saveToDisk();
|
nodeDB.saveToDisk();
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,9 @@ bool NodeDB::resetRadioConfig()
|
||||||
radioConfig.preferences.region = RegionCode_TW;
|
radioConfig.preferences.region = RegionCode_TW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the global myRegion
|
||||||
|
initRegion();
|
||||||
|
|
||||||
return didFactoryReset;
|
return didFactoryReset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,9 +248,6 @@ void NodeDB::init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the global myRegion
|
|
||||||
initRegion();
|
|
||||||
|
|
||||||
strncpy(myNodeInfo.firmware_version, optstr(APP_VERSION), sizeof(myNodeInfo.firmware_version));
|
strncpy(myNodeInfo.firmware_version, optstr(APP_VERSION), sizeof(myNodeInfo.firmware_version));
|
||||||
strncpy(myNodeInfo.hw_model, HW_VENDOR, sizeof(myNodeInfo.hw_model));
|
strncpy(myNodeInfo.hw_model, HW_VENDOR, sizeof(myNodeInfo.hw_model));
|
||||||
|
|
||||||
|
|
|
@ -30,15 +30,13 @@ const RegionInfo *myRegion;
|
||||||
|
|
||||||
void initRegion()
|
void initRegion()
|
||||||
{
|
{
|
||||||
if (!myRegion) {
|
const RegionInfo *r = regions;
|
||||||
const RegionInfo *r = regions;
|
for (; r->code != RegionCode_Unset && r->code != radioConfig.preferences.region; r++)
|
||||||
for (; r->code != RegionCode_Unset && r->code != radioConfig.preferences.region; r++)
|
;
|
||||||
;
|
myRegion = r;
|
||||||
myRegion = r;
|
DEBUG_MSG("Wanted region %d, using %s\n", radioConfig.preferences.region, r->name);
|
||||||
DEBUG_MSG("Wanted region %d, using %s\n", radioConfig.preferences.region, r->name);
|
|
||||||
|
|
||||||
myNodeInfo.num_channels = myRegion->numChannels; // Tell our android app how many channels we have
|
myNodeInfo.num_channels = myRegion->numChannels; // Tell our android app how many channels we have
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Ładowanie…
Reference in New Issue