mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-19 01:41:30 +10:00
Pass#2: Lots more savings in logs and string reduction surgery (#5251)
* Pass#2: Lots more savings in logs and string reduction surgery * Don't need Thread suffix either * Warn
This commit is contained in:
@@ -101,7 +101,7 @@ void esp32Setup()
|
||||
/* We explicitly don't want to do call randomSeed,
|
||||
// as that triggers the esp32 core to use a less secure pseudorandom function.
|
||||
uint32_t seed = esp_random();
|
||||
LOG_DEBUG("Setting random seed %u", seed);
|
||||
LOG_DEBUG("Set random seed %u", seed);
|
||||
randomSeed(seed);
|
||||
*/
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ void onFromRadioAuthorize(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_e
|
||||
// or make empty if the queue is empty
|
||||
fromRadio.write(fromRadioBytes, numBytes);
|
||||
} else {
|
||||
// LOG_INFO("Ignoring successor read");
|
||||
// LOG_INFO("Ignore successor read");
|
||||
}
|
||||
authorizeRead(conn_hdl);
|
||||
}
|
||||
@@ -275,20 +275,20 @@ void NRF52Bluetooth::setup()
|
||||
bledfusecure.begin(); // Install the DFU helper
|
||||
#endif
|
||||
// Configure and Start the Device Information Service
|
||||
LOG_INFO("Configuring the Device Information Service");
|
||||
LOG_INFO("Init the Device Information Service");
|
||||
bledis.setModel(optstr(HW_VERSION));
|
||||
bledis.setFirmwareRev(optstr(APP_VERSION));
|
||||
bledis.begin();
|
||||
// Start the BLE Battery Service and set it to 100%
|
||||
LOG_INFO("Configuring the Battery Service");
|
||||
LOG_INFO("Init the Battery Service");
|
||||
blebas.begin();
|
||||
blebas.write(0); // Unknown battery level for now
|
||||
// Setup the Heart Rate Monitor service using
|
||||
// BLEService and BLECharacteristic classes
|
||||
LOG_INFO("Configuring the Mesh bluetooth service");
|
||||
LOG_INFO("Init the Mesh bluetooth service");
|
||||
setupMeshService();
|
||||
// Setup the advertising packet(s)
|
||||
LOG_INFO("Setting up the advertising payload(s)");
|
||||
LOG_INFO("Set up the advertising payload(s)");
|
||||
startAdv();
|
||||
LOG_INFO("Advertising");
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ void setBluetoothEnable(bool enable)
|
||||
|
||||
// If not yet set-up
|
||||
if (!nrf52Bluetooth) {
|
||||
LOG_DEBUG("Initializing NRF52 Bluetooth");
|
||||
LOG_DEBUG("Init NRF52 Bluetooth");
|
||||
nrf52Bluetooth = new NRF52Bluetooth();
|
||||
nrf52Bluetooth->setup();
|
||||
|
||||
@@ -212,7 +212,7 @@ void nrf52Setup()
|
||||
} seed;
|
||||
nRFCrypto.begin();
|
||||
nRFCrypto.Random.generate(seed.seed8, sizeof(seed.seed8));
|
||||
LOG_DEBUG("Setting random seed %u", seed.seed32);
|
||||
LOG_DEBUG("Set random seed %u", seed.seed32);
|
||||
randomSeed(seed.seed32);
|
||||
nRFCrypto.end();
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void portduinoCustomInit()
|
||||
*/
|
||||
void portduinoSetup()
|
||||
{
|
||||
printf("Setting up Meshtastic on Portduino...\n");
|
||||
printf("Set up Meshtastic on Portduino...\n");
|
||||
int max_GPIO = 0;
|
||||
const configNames GPIO_lines[] = {cs,
|
||||
irq,
|
||||
|
||||
@@ -182,13 +182,13 @@ void SimRadio::onNotify(uint32_t notification)
|
||||
/** start an immediate transmit */
|
||||
void SimRadio::startSend(meshtastic_MeshPacket *txp)
|
||||
{
|
||||
printPacket("Starting low level send", txp);
|
||||
printPacket("Start low level send", txp);
|
||||
size_t numbytes = beginSending(txp);
|
||||
meshtastic_MeshPacket *p = packetPool.allocCopy(*txp);
|
||||
perhapsDecode(p);
|
||||
meshtastic_Compressed c = meshtastic_Compressed_init_default;
|
||||
c.portnum = p->decoded.portnum;
|
||||
// LOG_DEBUG("Sending back to simulator with portNum %d", p->decoded.portnum);
|
||||
// LOG_DEBUG("Send back to simulator with portNum %d", p->decoded.portnum);
|
||||
if (p->decoded.payload.size <= sizeof(c.data.bytes)) {
|
||||
memcpy(&c.data.bytes, p->decoded.payload.bytes, p->decoded.payload.size);
|
||||
c.data.size = p->decoded.payload.size;
|
||||
|
||||
Reference in New Issue
Block a user