Transport update (#722)
* Major transport rework * Adjust signal report calculations * Minor driver optimizations * Implement sanity check in legacy RFM69 driver * Additional RFM69 rework * RFM95 encryption * Polishing
This commit is contained in:
@@ -56,12 +56,12 @@ bool gatewayTransportSend(MyMessage &message)
|
||||
setIndication(INDICATION_GW_TX);
|
||||
char *topic = protocolFormatMQTTTopic(MY_MQTT_PUBLISH_TOPIC_PREFIX, message);
|
||||
debug(PSTR("Sending message on topic: %s\n"), topic);
|
||||
#ifdef MY_MQTT_CLIENT_PUBLISH_RETAIN
|
||||
bool retain = mGetCommand(message) == C_SET ||
|
||||
(mGetCommand(message) == C_INTERNAL && message.type == I_BATTERY_LEVEL);
|
||||
#else
|
||||
#ifdef MY_MQTT_CLIENT_PUBLISH_RETAIN
|
||||
bool retain = mGetCommand(message) == C_SET ||
|
||||
(mGetCommand(message) == C_INTERNAL && message.type == I_BATTERY_LEVEL);
|
||||
#else
|
||||
bool retain = false;
|
||||
#endif
|
||||
#endif
|
||||
return _MQTT_client.publish(topic, message.getString(_convBuffer), retain);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user