Merge pull request #337 from geeksville/master

fix screen redrawing
This commit is contained in:
Kevin Hester 2020-08-25 12:14:07 -07:00 committed by GitHub
commit 25ebb9adb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 6 deletions

Binary file not shown.

BIN
docs/hardware/T-SX1262.pdf Normal file

Binary file not shown.

View File

@ -819,14 +819,16 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg)
// DEBUG_MSG("Screen got status update %d\n", arg->getStatusType());
switch (arg->getStatusType()) {
case STATUS_TYPE_NODE:
if (nodeDB.updateTextMessage || nodeStatus->getLastNumTotal() != nodeStatus->getNumTotal())
setFrames();
prevFrame = -1;
if (nodeDB.updateTextMessage || nodeStatus->getLastNumTotal() != nodeStatus->getNumTotal()) {
setFrames(); // Regen the list of screens
prevFrame = -1; // Force a GUI update
setPeriod(1); // Update the screen right away
}
nodeDB.updateGUI = false;
nodeDB.updateTextMessage = false;
break;
}
setPeriod(1); // Update the screen right away
return 0;
}
} // namespace graphics

View File

@ -68,6 +68,9 @@ void printPacket(const char *prefix, const MeshPacket *p)
if (p->rx_time != 0) {
DEBUG_MSG(" rxtime=%u", p->rx_time);
}
if (p->rx_snr != 0.0) {
DEBUG_MSG(" rxSNR=%g", p->rx_snr);
}
DEBUG_MSG(")\n");
}
@ -115,8 +118,6 @@ unsigned long hash(char *str)
return hash;
}
#define POWER_DEFAULT 17
/**

View File

@ -74,6 +74,10 @@ bool SX1262Interface::reconfigure()
err = lora.setCodingRate(cr);
assert(err == ERR_NONE);
// Hmm - seems to lower SNR when the signal levels are high. Leaving off for now...
//err = lora.setRxGain(true);
//assert(err == ERR_NONE);
err = lora.setSyncWord(syncWord);
assert(err == ERR_NONE);
@ -123,6 +127,7 @@ void SX1262Interface::setStandby()
*/
void SX1262Interface::addReceiveMetadata(MeshPacket *mp)
{
// DEBUG_MSG("PacketStatus %x\n", lora.getPacketStatus());
mp->rx_snr = lora.getSNR();
}