mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-26 22:33:24 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
55bce94173
24
.github/workflows/main_matrix.yml
vendored
24
.github/workflows/main_matrix.yml
vendored
@ -134,8 +134,8 @@ jobs:
|
||||
package-raspbian-armv7l:
|
||||
uses: ./.github/workflows/package_raspbian_armv7l.yml
|
||||
|
||||
# package-native:
|
||||
# uses: ./.github/workflows/package_amd64.yml
|
||||
package-native:
|
||||
uses: ./.github/workflows/package_amd64.yml
|
||||
|
||||
after-checks:
|
||||
runs-on: ubuntu-latest
|
||||
@ -249,7 +249,7 @@ jobs:
|
||||
gather-artifacts,
|
||||
package-raspbian,
|
||||
package-raspbian-armv7l,
|
||||
# package-native,
|
||||
package-native,
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -308,15 +308,15 @@ jobs:
|
||||
asset_name: meshtasticd_${{ steps.version.outputs.version }}_armhf.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
# - name: Add raspbian amd64 .deb
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
# with:
|
||||
# upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
# asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
||||
# asset_name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
||||
# asset_content_type: application/vnd.debian.binary-package
|
||||
- name: Add raspbian amd64 .deb
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./output/meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
||||
asset_name: meshtasticd_${{ steps.version.outputs.version }}_amd64.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
- name: Bump version.properties
|
||||
run: >-
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fd5760108a2399ca58cd7df280afe2b434aae2c2
|
||||
Subproject commit 49ebc4783275f108a9f8723ca52a6edf0a954c55
|
@ -35,6 +35,12 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
||||
return Router::shouldFilterReceived(p);
|
||||
}
|
||||
|
||||
bool FloodingRouter::isRebroadcaster()
|
||||
{
|
||||
return config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE &&
|
||||
config.device.rebroadcast_mode != meshtastic_Config_DeviceConfig_RebroadcastMode_NONE;
|
||||
}
|
||||
|
||||
void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)
|
||||
{
|
||||
bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) && (p->decoded.request_id != 0);
|
||||
@ -45,7 +51,7 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
|
||||
}
|
||||
if (!isToUs(p) && (p->hop_limit > 0) && !isFromUs(p)) {
|
||||
if (p->id != 0) {
|
||||
if (config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE) {
|
||||
if (isRebroadcaster()) {
|
||||
meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it
|
||||
|
||||
tosend->hop_limit--; // bump down the hop count
|
||||
@ -62,7 +68,7 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
|
||||
// We are careful not to call our hooked version of send() - because we don't want to check this again
|
||||
Router::send(tosend);
|
||||
} else {
|
||||
LOG_DEBUG("Not rebroadcasting. Role = Role_ClientMute\n");
|
||||
LOG_DEBUG("Not rebroadcasting: Role = CLIENT_MUTE or Rebroadcast Mode = NONE\n");
|
||||
}
|
||||
} else {
|
||||
LOG_DEBUG("Ignoring 0 id broadcast\n");
|
||||
|
@ -29,6 +29,8 @@
|
||||
class FloodingRouter : public Router, protected PacketHistory
|
||||
{
|
||||
private:
|
||||
bool isRebroadcaster();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -463,6 +463,14 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
||||
requiresReboot = false;
|
||||
}
|
||||
config.device = c.payload_variant.device;
|
||||
if (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_NONE &&
|
||||
IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER,
|
||||
meshtastic_Config_DeviceConfig_Role_REPEATER)) {
|
||||
config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_ALL;
|
||||
const char *warning = "Rebroadcast mode can't be set to NONE for a router or repeater\n";
|
||||
LOG_WARN(warning);
|
||||
sendWarning(warning);
|
||||
}
|
||||
// If we're setting router role for the first time, install its intervals
|
||||
if (existingRole != c.payload_variant.device.role)
|
||||
nodeDB->installRoleDefaults(c.payload_variant.device.role);
|
||||
@ -1095,6 +1103,15 @@ bool AdminModule::messageIsRequest(const meshtastic_AdminMessage *r)
|
||||
return false;
|
||||
}
|
||||
|
||||
void AdminModule::sendWarning(const char *message)
|
||||
{
|
||||
meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();
|
||||
cn->level = meshtastic_LogRecord_Level_WARNING;
|
||||
cn->time = getValidTime(RTCQualityFromNet);
|
||||
strncpy(cn->message, message, sizeof(cn->message));
|
||||
service->sendClientNotification(cn);
|
||||
}
|
||||
|
||||
void disableBluetooth()
|
||||
{
|
||||
#if HAS_BLUETOOTH
|
||||
|
@ -59,6 +59,7 @@ class AdminModule : public ProtobufModule<meshtastic_AdminMessage>, public Obser
|
||||
|
||||
bool messageIsResponse(const meshtastic_AdminMessage *r);
|
||||
bool messageIsRequest(const meshtastic_AdminMessage *r);
|
||||
void sendWarning(const char *message);
|
||||
};
|
||||
|
||||
extern AdminModule *adminModule;
|
||||
|
@ -54,7 +54,7 @@
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_BUSY LORA_BUSY
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL
|
||||
#define SX126X_RXEN LORA_DIO4 // Antenna switch !CTRL via GPIO17
|
||||
#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL
|
||||
#define SX126X_POWER_EN LORA_DIO4 // Antenna switch !CTRL via GPIO17
|
||||
// #define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user