Merge pull request #504 from geeksville/dev

Dev
This commit is contained in:
Kevin Hester 2020-10-28 23:14:52 -07:00 committed by GitHub
commit 62a8c968e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1007 additions and 16 deletions

View File

@ -1,3 +1,3 @@
export VERSION=1.1.6
export VERSION=1.1.7

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 KiB

View File

@ -2,12 +2,12 @@
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:
CS0 from RF95 goes to CS0 on CS341
DIO0 from RF95 goes to INT on CS341
RST from RF95 goes to RST on CS341
CS0 from RF95 goes to CS0 on CH341
DIO0 from RF95 goes to INT on CH341
RST from RF95 goes to RST on CH341
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/

View File

@ -198,7 +198,10 @@ void MeshService::loop()
bool MeshService::reloadConfig()
{
// 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
configChanged.notifyObservers(NULL);
nodeDB.saveToDisk();

View File

@ -150,6 +150,9 @@ bool NodeDB::resetRadioConfig()
radioConfig.preferences.region = RegionCode_TW;
}
// Update the global myRegion
initRegion();
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.hw_model, HW_VENDOR, sizeof(myNodeInfo.hw_model));

View File

@ -30,15 +30,13 @@ const RegionInfo *myRegion;
void initRegion()
{
if (!myRegion) {
const RegionInfo *r = regions;
for (; r->code != RegionCode_Unset && r->code != radioConfig.preferences.region; r++)
;
myRegion = r;
DEBUG_MSG("Wanted region %d, using %s\n", radioConfig.preferences.region, r->name);
const RegionInfo *r = regions;
for (; r->code != RegionCode_Unset && r->code != radioConfig.preferences.region; r++)
;
myRegion = r;
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
}
/**