Skip to content

Commit 674f101

Browse files
authored
Receiver 433 Configuration (#391)
1 parent 43aa1a9 commit 674f101

17 files changed

Lines changed: 42 additions & 129 deletions

File tree

app/backplane/radio_module/core.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,3 @@ CONFIG_GNSS=y
5858
CONFIG_GNSS_SATELLITES=y
5959
CONFIG_GNSS_NMEA0183=y
6060
CONFIG_UART_INTERRUPT_DRIVEN=y
61-
62-
# Suppress LORA LOG to only errors
63-
CONFIG_LORA_LOG_LEVEL_ERR=y

app/ground/receiver_module/boards/native_sim.overlay

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
// anyway
2929
};
3030
};
31+
32+
gnss: gnss {
33+
status = "okay";
34+
compatible = "openrocket,gnss";
35+
lag-time-us = <1000>;
36+
sampling-period-us = <(5*1000*1000)>;
37+
rtc = <&rtc>;
38+
};
3139
};
3240

3341
&rtc {
@@ -77,4 +85,4 @@
7785
};
7886
};
7987
};
80-
};
88+
};

app/ground/receiver_module/core.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,3 @@ CONFIG_SENSOR=n
5858
CONFIG_GNSS=n
5959
CONFIG_GNSS_SATELLITES=n
6060
CONFIG_GNSS_NMEA0183=n
61-
62-
# Suppress LORA LOG to only errors
63-
CONFIG_LORA_LOG_LEVEL_ERR=y

app/ground/receiver_module/include/c_receiver_module.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,21 @@ class CReceiverModule : public CProjectConfiguration {
4545
static constexpr uint16_t radioModuleFrequencyAckPort = NNetworkDefs::RADIO_MODULE_FREQUENCY_CHANGE_RESPONSE_PORT;
4646

4747
// Devices
48+
#ifndef CONFIG_ARCH_POSIX
4849
CLora lora;
50+
#endif
4951

5052
// Message Ports
5153
CMessagePort<LaunchLoraFrame>& loraBroadcastMessagePort;
5254
CMessagePort<LaunchLoraFrame>& udpBroadcastMessagePort;
5355

5456
// Tenants
57+
#ifndef CONFIG_ARCH_POSIX
5558
CLoraTenant loraTenant{lora, loraBroadcastMessagePort};
5659

5760
CLoraFreqRequestTenant freqRequestTenant{ipAddrStr.c_str(), lora, radioModuleFrequencyCommandPort,
5861
loraBroadcastMessagePort, K_SECONDS(15)};
62+
#endif
5963

6064
CUdpListenerTenant commandListenerTenant{"Radio Module Command Listener Tenant", ipAddrStr.c_str(),
6165
radioModuleCommandPort, &loraBroadcastMessagePort};

app/ground/receiver_module/sample.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ common:
77
- radio_module
88
tests:
99
ground.receiever_module.default: {}
10+
ground.receiver_module.433mhz:
11+
extra_overlay_confs:
12+
- 433mhz.conf
1013
ground.receiver_module.debug:
1114
extra_overlay_confs:
1215
- debug.conf
16+
ground.receiver_module.debug_433mhz:
17+
extra_overlay_confs:
18+
- debug.conf
19+
- 433mhz.conf

app/ground/receiver_module/src/c_receiver_module.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,26 @@ static auto loraBroadcastMsgQueue = CMsgqMessagePort<LaunchLoraFrame>(broadcastQ
1111
static auto udpBroadcastMsgQueue = CMsgqMessagePort<LaunchLoraFrame>(broadcastQueue);
1212

1313
CReceiverModule::CReceiverModule()
14-
: CProjectConfiguration(), lora(*DEVICE_DT_GET(DT_ALIAS(lora))), loraBroadcastMessagePort(loraBroadcastMsgQueue),
14+
: CProjectConfiguration(),
15+
#ifndef CONFIG_ARCH_POSIX
16+
lora(*DEVICE_DT_GET(DT_ALIAS(lora))),
17+
#endif
18+
loraBroadcastMessagePort(loraBroadcastMsgQueue),
1519
udpBroadcastMessagePort(udpBroadcastMsgQueue) {}
1620

1721
void CReceiverModule::AddTenantsToTasks() {
1822
// Networking
1923
networkingTask.AddTenant(commandListenerTenant);
2024
networkingTask.AddTenant(dataRequestListenerTenant);
2125

26+
#ifndef CONFIG_ARCH_POSIX
2227
// LoRa
2328
loraTenant.SetToGround();
2429
loraTenant.RegisterFrameHandler(radioModuleFrequencyAckPort, freqRequestTenant);
2530
loraTenant.RegisterDefaultFrameHandler(loraToUdpHandler);
2631
loraTask.AddTenant(freqRequestTenant);
2732
loraTask.AddTenant(loraTenant);
33+
#endif
2834
}
2935

3036
void CReceiverModule::AddTasksToRtos() {

app/ground/receiver_module/src/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
LOG_MODULE_REGISTER(main);
1515

1616
int main() {
17-
LOG_INF("Receiver starting");
17+
#ifdef CONFIG_LICENSED_FREQUENCY
18+
LOG_INF("Receiver boot: 433 MHz build");
19+
#else
20+
LOG_INF("Receiver boot: 915 MHz build");
21+
#endif
22+
1823
static CReceiverModule receiverModule{};
1924
receiverModule.AddTenantsToTasks();
2025
receiverModule.AddTasksToRtos();

app/payload/control_freak/flight-software/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sample:
2-
description: control_freak
2+
description: Control Freak flight software
33
name: control_freak
44
common:
55
build_only: true

app/samples/lora_bcast/.idea/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/samples/lora_bcast/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)