Compare commits

..

7 Commits

Author SHA1 Message Date
Kevin Hester
8f5251583f Merge pull request #738 from geeksville/eink
Eink
2021-03-13 09:00:57 +08:00
Kevin Hester
c2122a6859 Merge remote-tracking branch 'root/master' into eink 2021-03-13 08:55:06 +08:00
Kevin Hester
6dd65adebd 1.2.10 2021-03-13 08:54:02 +08:00
Kevin Hester
c227143b53 @mc-hamster, I think storeandforward was accidentally wrong (no worries though) 2021-03-13 08:41:50 +08:00
Kevin Hester
cdd696c1ff todo updates 2021-03-13 08:30:07 +08:00
Kevin Hester
3e6817cd18 fix board reboot due to forwarding packets we don't have keys for 2021-03-13 08:29:58 +08:00
Kevin Hester
a5ed607261 fix memory corruption in storeandforward 2021-03-13 08:29:32 +08:00
6 changed files with 29 additions and 15 deletions

View File

@@ -4,6 +4,9 @@ You probably don't care about this section - skip to the next one.
## 1.2 cleanup & multichannel support: ## 1.2 cleanup & multichannel support:
* timestamps on oled screen are wrong - don't seem to be updating based on message rx
* luxon bug report - seeing rx acks for nodes that are not on the network
* channel hash suffixes are wrong on android
* cdcacm bug on nrf52: emittx thinks it emitted but client sees nothing. works again later * cdcacm bug on nrf52: emittx thinks it emitted but client sees nothing. works again later
* nrf52: segger logs have errors in formatting that should be impossible (because not going through serial, try stalling on segger) * nrf52: segger logs have errors in formatting that should be impossible (because not going through serial, try stalling on segger)
* DONE call RouterPlugin for *all* packets - not just Router packets * DONE call RouterPlugin for *all* packets - not just Router packets

2
proto

Submodule proto updated: e63f9713f7...bf8ac6718c

View File

@@ -34,11 +34,19 @@ bool ReliableRouter::shouldFilterReceived(const MeshPacket *p)
// We are seeing someone rebroadcast one of our broadcast attempts. // We are seeing someone rebroadcast one of our broadcast attempts.
// If this is the first time we saw this, cancel any retransmissions we have queued up and generate an internal ack for // If this is the first time we saw this, cancel any retransmissions we have queued up and generate an internal ack for
// the original sending process. // the original sending process.
if (stopRetransmission(getFrom(p), p->id)) {
// FIXME - we might want to turn off this "optimization", it does save lots of airtime but it assumes that once we've heard one
// one adjacent node hear our packet that a) probably other adjacent nodes heard it and b) we can trust those nodes to reach
// our destination. Both of which might be incorrect.
auto key = GlobalPacketId(getFrom(p), p->id);
auto old = findPendingPacket(key);
if (old) {
DEBUG_MSG("generating implicit ack\n"); DEBUG_MSG("generating implicit ack\n");
// NOTE: we do NOT check p->wantAck here because p is the INCOMING rebroadcast and that packet is not expected to be // NOTE: we do NOT check p->wantAck here because p is the INCOMING rebroadcast and that packet is not expected to be
// marked as wantAck // marked as wantAck
sendAckNak(Routing_Error_NONE, getFrom(p), p->id, p->channel); sendAckNak(Routing_Error_NONE, getFrom(p), p->id, old->packet->channel);
stopRetransmission(key);
} }
} }

View File

@@ -104,7 +104,6 @@ typedef struct _RadioConfig_UserPreferences {
bool range_test_plugin_enabled; bool range_test_plugin_enabled;
uint32_t range_test_plugin_sender; uint32_t range_test_plugin_sender;
bool range_test_plugin_save; bool range_test_plugin_save;
bool store_forward_plugin_enabled;
uint32_t store_forward_plugin_records; uint32_t store_forward_plugin_records;
bool environmental_measurement_plugin_measurement_enabled; bool environmental_measurement_plugin_measurement_enabled;
bool environmental_measurement_plugin_screen_enabled; bool environmental_measurement_plugin_screen_enabled;
@@ -114,6 +113,7 @@ typedef struct _RadioConfig_UserPreferences {
bool environmental_measurement_plugin_display_farenheit; bool environmental_measurement_plugin_display_farenheit;
RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType environmental_measurement_plugin_sensor_type; RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType environmental_measurement_plugin_sensor_type;
uint32_t environmental_measurement_plugin_sensor_pin; uint32_t environmental_measurement_plugin_sensor_pin;
bool store_forward_plugin_enabled;
} RadioConfig_UserPreferences; } RadioConfig_UserPreferences;
typedef struct _RadioConfig { typedef struct _RadioConfig {
@@ -150,9 +150,9 @@ extern "C" {
/* Initializer values for message structs */ /* Initializer values for message structs */
#define RadioConfig_init_default {false, RadioConfig_UserPreferences_init_default} #define RadioConfig_init_default {false, RadioConfig_UserPreferences_init_default}
#define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0} #define RadioConfig_UserPreferences_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0, 0}
#define RadioConfig_init_zero {false, RadioConfig_UserPreferences_init_zero} #define RadioConfig_init_zero {false, RadioConfig_UserPreferences_init_zero}
#define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0} #define RadioConfig_UserPreferences_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, _RegionCode_MIN, _ChargeCurrent_MIN, _LocationSharing_MIN, _GpsOperation_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _RadioConfig_UserPreferences_EnvironmentalMeasurementSensorType_MIN, 0, 0}
/* Field tags (for use in manual encoding/decoding) */ /* Field tags (for use in manual encoding/decoding) */
#define RadioConfig_UserPreferences_position_broadcast_secs_tag 1 #define RadioConfig_UserPreferences_position_broadcast_secs_tag 1
@@ -195,7 +195,6 @@ extern "C" {
#define RadioConfig_UserPreferences_range_test_plugin_enabled_tag 132 #define RadioConfig_UserPreferences_range_test_plugin_enabled_tag 132
#define RadioConfig_UserPreferences_range_test_plugin_sender_tag 133 #define RadioConfig_UserPreferences_range_test_plugin_sender_tag 133
#define RadioConfig_UserPreferences_range_test_plugin_save_tag 134 #define RadioConfig_UserPreferences_range_test_plugin_save_tag 134
#define RadioConfig_UserPreferences_store_forward_plugin_enabled_tag 136
#define RadioConfig_UserPreferences_store_forward_plugin_records_tag 137 #define RadioConfig_UserPreferences_store_forward_plugin_records_tag 137
#define RadioConfig_UserPreferences_environmental_measurement_plugin_measurement_enabled_tag 140 #define RadioConfig_UserPreferences_environmental_measurement_plugin_measurement_enabled_tag 140
#define RadioConfig_UserPreferences_environmental_measurement_plugin_screen_enabled_tag 141 #define RadioConfig_UserPreferences_environmental_measurement_plugin_screen_enabled_tag 141
@@ -205,6 +204,7 @@ extern "C" {
#define RadioConfig_UserPreferences_environmental_measurement_plugin_display_farenheit_tag 145 #define RadioConfig_UserPreferences_environmental_measurement_plugin_display_farenheit_tag 145
#define RadioConfig_UserPreferences_environmental_measurement_plugin_sensor_type_tag 146 #define RadioConfig_UserPreferences_environmental_measurement_plugin_sensor_type_tag 146
#define RadioConfig_UserPreferences_environmental_measurement_plugin_sensor_pin_tag 147 #define RadioConfig_UserPreferences_environmental_measurement_plugin_sensor_pin_tag 147
#define RadioConfig_UserPreferences_store_forward_plugin_enabled_tag 148
#define RadioConfig_preferences_tag 1 #define RadioConfig_preferences_tag 1
/* Struct field encoding specification for nanopb */ /* Struct field encoding specification for nanopb */
@@ -255,7 +255,6 @@ X(a, STATIC, SINGULAR, BOOL, ext_notification_plugin_alert_bell, 131) \
X(a, STATIC, SINGULAR, BOOL, range_test_plugin_enabled, 132) \ X(a, STATIC, SINGULAR, BOOL, range_test_plugin_enabled, 132) \
X(a, STATIC, SINGULAR, UINT32, range_test_plugin_sender, 133) \ X(a, STATIC, SINGULAR, UINT32, range_test_plugin_sender, 133) \
X(a, STATIC, SINGULAR, BOOL, range_test_plugin_save, 134) \ X(a, STATIC, SINGULAR, BOOL, range_test_plugin_save, 134) \
X(a, STATIC, SINGULAR, BOOL, store_forward_plugin_enabled, 136) \
X(a, STATIC, SINGULAR, UINT32, store_forward_plugin_records, 137) \ X(a, STATIC, SINGULAR, UINT32, store_forward_plugin_records, 137) \
X(a, STATIC, SINGULAR, BOOL, environmental_measurement_plugin_measurement_enabled, 140) \ X(a, STATIC, SINGULAR, BOOL, environmental_measurement_plugin_measurement_enabled, 140) \
X(a, STATIC, SINGULAR, BOOL, environmental_measurement_plugin_screen_enabled, 141) \ X(a, STATIC, SINGULAR, BOOL, environmental_measurement_plugin_screen_enabled, 141) \
@@ -264,7 +263,8 @@ X(a, STATIC, SINGULAR, UINT32, environmental_measurement_plugin_update_inter
X(a, STATIC, SINGULAR, UINT32, environmental_measurement_plugin_recovery_interval, 144) \ X(a, STATIC, SINGULAR, UINT32, environmental_measurement_plugin_recovery_interval, 144) \
X(a, STATIC, SINGULAR, BOOL, environmental_measurement_plugin_display_farenheit, 145) \ X(a, STATIC, SINGULAR, BOOL, environmental_measurement_plugin_display_farenheit, 145) \
X(a, STATIC, SINGULAR, UENUM, environmental_measurement_plugin_sensor_type, 146) \ X(a, STATIC, SINGULAR, UENUM, environmental_measurement_plugin_sensor_type, 146) \
X(a, STATIC, SINGULAR, UINT32, environmental_measurement_plugin_sensor_pin, 147) X(a, STATIC, SINGULAR, UINT32, environmental_measurement_plugin_sensor_pin, 147) \
X(a, STATIC, SINGULAR, BOOL, store_forward_plugin_enabled, 148)
#define RadioConfig_UserPreferences_CALLBACK NULL #define RadioConfig_UserPreferences_CALLBACK NULL
#define RadioConfig_UserPreferences_DEFAULT NULL #define RadioConfig_UserPreferences_DEFAULT NULL

View File

@@ -24,10 +24,13 @@ int32_t StoreForwardPlugin::runOnce()
/* /*
Uncomment the preferences below if you want to use the plugin Uncomment the preferences below if you want to use the plugin
without having to configure it from the PythonAPI or WebUI. without having to configure it from the PythonAPI or WebUI.
*/
attn @mc-hamster I moved this back inside the comment because I don't think it was intended to checkin. It was forcing all
nodes to be running this and turning off is_router.
radioConfig.preferences.store_forward_plugin_enabled = 1; radioConfig.preferences.store_forward_plugin_enabled = 1;
radioConfig.preferences.is_router = 0; radioConfig.preferences.is_router = 0;
*/
if (radioConfig.preferences.store_forward_plugin_enabled) { if (radioConfig.preferences.store_forward_plugin_enabled) {
@@ -227,14 +230,14 @@ void StoreForwardPlugin::sawNodeReport()
MeshPacket *StoreForwardPluginRadio::allocReply() MeshPacket *StoreForwardPluginRadio::allocReply()
{ {
//auto reply = allocDataPacket(); // Allocate a packet for sending auto reply = allocDataPacket(); // Allocate a packet for sending
//return reply; return reply; // attn @mc-hamster this code was commented out and was causing memory corruption
} }
void StoreForwardPluginRadio::sendPayload(NodeNum dest, bool wantReplies) void StoreForwardPluginRadio::sendPayload(NodeNum dest, bool wantReplies)
{ {
MeshPacket *p = this->allocReply();
/* /*
MeshPacket *p = this->allocReply(); // attn @mc-hamster, I moved inside the commented block to prevent leaking memory
p->to = dest; p->to = dest;
p->decoded.want_response = wantReplies; p->decoded.want_response = wantReplies;

View File

@@ -1,4 +1,4 @@
[VERSION] [VERSION]
major = 1 major = 1
minor = 2 minor = 2
build = 9 build = 10