mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-19 11:32:06 +00:00
commit
385e291f51
@ -199,7 +199,7 @@ We'd love to have you join us on this merry little project. Please see our [deve
|
|||||||
|
|
||||||
# Credits
|
# Credits
|
||||||
|
|
||||||
This project is run by volunteers. Past contributors include:
|
This project is run by volunteers. We are a friendly group and welcome any contribution (code fixes, documentation, features, bug reports etc...). We try to be good about listing contributor names in release notes, but it has become unwieldy for the main-devs to keep updating the list below and we've neglected it too long. If you'd like your name included in this list please send a pull request to edit this README and simply add your line yourself. Thank you very much for your help!
|
||||||
|
|
||||||
- @astro-arphid: Added support for 433MHz radios in europe.
|
- @astro-arphid: Added support for 433MHz radios in europe.
|
||||||
- @claesg: Various documentation fixes and 3D print enclosures
|
- @claesg: Various documentation fixes and 3D print enclosures
|
||||||
|
@ -4,6 +4,7 @@ You probably don't care about this section - skip to the next one.
|
|||||||
|
|
||||||
## before next release
|
## before next release
|
||||||
|
|
||||||
|
* DONE naks are being dropped (though enqueuedLocal) sometimes before phone/PC gets them
|
||||||
* DONE have android fill in if local GPS has poor signal
|
* DONE have android fill in if local GPS has poor signal
|
||||||
* fix heltec battery scaling
|
* fix heltec battery scaling
|
||||||
* add reference counting to mesh packets
|
* add reference counting to mesh packets
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "NotifiedWorkerThread.h"
|
#include "NotifiedWorkerThread.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "main.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
namespace concurrency
|
namespace concurrency
|
||||||
@ -28,6 +29,7 @@ IRAM_ATTR bool NotifiedWorkerThread::notifyCommon(uint32_t v, bool overwrite)
|
|||||||
if (overwrite || notification == 0) {
|
if (overwrite || notification == 0) {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
setInterval(0); // Run ASAP
|
setInterval(0); // Run ASAP
|
||||||
|
runASAP = true;
|
||||||
|
|
||||||
notification = v;
|
notification = v;
|
||||||
if (debugNotification)
|
if (debugNotification)
|
||||||
|
@ -717,6 +717,7 @@ void Screen::handleSetOn(bool on)
|
|||||||
dispdev.displayOn();
|
dispdev.displayOn();
|
||||||
enabled = true;
|
enabled = true;
|
||||||
setInterval(0); // Draw ASAP
|
setInterval(0); // Draw ASAP
|
||||||
|
runASAP = true;
|
||||||
} else {
|
} else {
|
||||||
DEBUG_MSG("Turning off screen\n");
|
DEBUG_MSG("Turning off screen\n");
|
||||||
dispdev.displayOff();
|
dispdev.displayOff();
|
||||||
@ -1053,6 +1054,7 @@ void Screen::setFastFramerate()
|
|||||||
targetFramerate = SCREEN_TRANSITION_FRAMERATE;
|
targetFramerate = SCREEN_TRANSITION_FRAMERATE;
|
||||||
ui.setTargetFPS(targetFramerate);
|
ui.setTargetFPS(targetFramerate);
|
||||||
setInterval(0); // redraw ASAP
|
setInterval(0); // redraw ASAP
|
||||||
|
runASAP = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||||
|
@ -590,8 +590,14 @@ void rebootCheck()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If a thread does something that might need for it to be rescheduled ASAP it can set this flag
|
||||||
|
// This will supress the current delay and instead try to run ASAP.
|
||||||
|
bool runASAP;
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
|
runASAP = false;
|
||||||
|
|
||||||
// axpDebugOutput.loop();
|
// axpDebugOutput.loop();
|
||||||
|
|
||||||
// heap_caps_check_integrity_all(true); // FIXME - disable this expensive check
|
// heap_caps_check_integrity_all(true); // FIXME - disable this expensive check
|
||||||
@ -627,6 +633,7 @@ void loop()
|
|||||||
mainController.nextThread->tillRun(millis())); */
|
mainController.nextThread->tillRun(millis())); */
|
||||||
|
|
||||||
// We want to sleep as long as possible here - because it saves power
|
// We want to sleep as long as possible here - because it saves power
|
||||||
mainDelay.delay(delayMsec);
|
if (!runASAP)
|
||||||
|
mainDelay.delay(delayMsec);
|
||||||
// if (didWake) DEBUG_MSG("wake!\n");
|
// if (didWake) DEBUG_MSG("wake!\n");
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,8 @@ const char *getDeviceName();
|
|||||||
|
|
||||||
extern uint32_t rebootAtMsec;
|
extern uint32_t rebootAtMsec;
|
||||||
|
|
||||||
|
// If a thread does something that might need for it to be rescheduled ASAP it can set this flag
|
||||||
|
// This will supress the current delay and instead try to run ASAP.
|
||||||
|
extern bool runASAP;
|
||||||
|
|
||||||
void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop();
|
void nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop();
|
||||||
|
@ -36,6 +36,7 @@ MeshPacket *MeshPlugin::allocAckNak(Routing_Error err, NodeNum to, PacketId idFr
|
|||||||
Routing c = Routing_init_default;
|
Routing c = Routing_init_default;
|
||||||
|
|
||||||
c.error_reason = err;
|
c.error_reason = err;
|
||||||
|
c.which_variant = Routing_error_reason_tag;
|
||||||
|
|
||||||
// Now that we have moded sendAckNak up one level into the class heirarchy we can no longer assume we are a RoutingPlugin
|
// Now that we have moded sendAckNak up one level into the class heirarchy we can no longer assume we are a RoutingPlugin
|
||||||
// So we manually call pb_encode_to_bytes and specify routing port number
|
// So we manually call pb_encode_to_bytes and specify routing port number
|
||||||
|
@ -79,9 +79,10 @@ class ReliableRouter : public FloodingRouter
|
|||||||
/** Do our retransmission handling */
|
/** Do our retransmission handling */
|
||||||
virtual int32_t runOnce()
|
virtual int32_t runOnce()
|
||||||
{
|
{
|
||||||
auto d = FloodingRouter::runOnce();
|
// Note: We must doRetransmissions FIRST, because it might queue up work for the base class runOnce implementation
|
||||||
|
auto d = doRetransmissions();
|
||||||
|
|
||||||
int32_t r = doRetransmissions();
|
int32_t r = FloodingRouter::runOnce();
|
||||||
|
|
||||||
return min(d, r);
|
return min(d, r);
|
||||||
}
|
}
|
||||||
@ -109,7 +110,6 @@ class ReliableRouter : public FloodingRouter
|
|||||||
PendingPacket *startRetransmission(MeshPacket *p);
|
PendingPacket *startRetransmission(MeshPacket *p);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop any retransmissions we are doing of the specified node/packet ID pair
|
* Stop any retransmissions we are doing of the specified node/packet ID pair
|
||||||
*
|
*
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "RTC.h"
|
#include "RTC.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "main.h"
|
||||||
#include "mesh-pb-constants.h"
|
#include "mesh-pb-constants.h"
|
||||||
#include "plugins/RoutingPlugin.h"
|
#include "plugins/RoutingPlugin.h"
|
||||||
|
|
||||||
@ -55,9 +56,11 @@ int32_t Router::runOnce()
|
|||||||
{
|
{
|
||||||
MeshPacket *mp;
|
MeshPacket *mp;
|
||||||
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {
|
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {
|
||||||
|
// printPacket("handle fromRadioQ", mp);
|
||||||
perhapsHandleReceived(mp);
|
perhapsHandleReceived(mp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DEBUG_MSG("sleeping forever!\n");
|
||||||
return INT32_MAX; // Wait a long time - until we get woken for the message queue
|
return INT32_MAX; // Wait a long time - until we get woken for the message queue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +120,9 @@ void Router::abortSendAndNak(Routing_Error err, MeshPacket *p)
|
|||||||
|
|
||||||
void Router::setReceivedMessage()
|
void Router::setReceivedMessage()
|
||||||
{
|
{
|
||||||
|
// DEBUG_MSG("set interval to ASAP\n");
|
||||||
setInterval(0); // Run ASAP, so we can figure out our correct sleep time
|
setInterval(0); // Run ASAP, so we can figure out our correct sleep time
|
||||||
|
runASAP = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorCode Router::sendLocal(MeshPacket *p)
|
ErrorCode Router::sendLocal(MeshPacket *p)
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include <HTTPBodyParser.hpp>
|
#include <HTTPBodyParser.hpp>
|
||||||
#include <HTTPMultipartBodyParser.hpp>
|
#include <HTTPMultipartBodyParser.hpp>
|
||||||
#include <HTTPURLEncodedBodyParser.hpp>
|
#include <HTTPURLEncodedBodyParser.hpp>
|
||||||
#include <Preferences.h>
|
|
||||||
#include <SPIFFS.h>
|
#include <SPIFFS.h>
|
||||||
|
|
||||||
#ifndef NO_ESP32
|
#ifndef NO_ESP32
|
||||||
@ -837,11 +836,6 @@ void handleReport(HTTPRequest *req, HTTPResponse *res)
|
|||||||
ResourceParameters *params = req->getParams();
|
ResourceParameters *params = req->getParams();
|
||||||
std::string content;
|
std::string content;
|
||||||
|
|
||||||
Preferences preferences;
|
|
||||||
preferences.begin("meshtastic", false);
|
|
||||||
|
|
||||||
uint32_t rebootCounter = preferences.getUInt("rebootCounter", 0);
|
|
||||||
|
|
||||||
if (!params->getQueryParameter("content", content)) {
|
if (!params->getQueryParameter("content", content)) {
|
||||||
content = "json";
|
content = "json";
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 1
|
major = 1
|
||||||
minor = 2
|
minor = 2
|
||||||
build = 16
|
build = 17
|
||||||
|
Loading…
Reference in New Issue
Block a user