Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/backplane/radio_module/core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,3 @@ CONFIG_GNSS=y
CONFIG_GNSS_SATELLITES=y
CONFIG_GNSS_NMEA0183=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Suppress LORA LOG to only errors
CONFIG_LORA_LOG_LEVEL_ERR=y
10 changes: 9 additions & 1 deletion app/ground/receiver_module/boards/native_sim.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
// anyway
};
};

gnss: gnss {
status = "okay";
compatible = "openrocket,gnss";
lag-time-us = <1000>;
sampling-period-us = <(5*1000*1000)>;
rtc = <&rtc>;
};
};

&rtc {
Expand Down Expand Up @@ -77,4 +85,4 @@
};
};
};
};
};
3 changes: 0 additions & 3 deletions app/ground/receiver_module/core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,3 @@ CONFIG_SENSOR=n
CONFIG_GNSS=n
CONFIG_GNSS_SATELLITES=n
CONFIG_GNSS_NMEA0183=n

# Suppress LORA LOG to only errors
CONFIG_LORA_LOG_LEVEL_ERR=y
4 changes: 4 additions & 0 deletions app/ground/receiver_module/include/c_receiver_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ class CReceiverModule : public CProjectConfiguration {
static constexpr uint16_t radioModuleFrequencyAckPort = NNetworkDefs::RADIO_MODULE_FREQUENCY_CHANGE_RESPONSE_PORT;

// Devices
#ifndef CONFIG_ARCH_POSIX
CLora lora;
#endif

// Message Ports
CMessagePort<LaunchLoraFrame>& loraBroadcastMessagePort;
CMessagePort<LaunchLoraFrame>& udpBroadcastMessagePort;

// Tenants
#ifndef CONFIG_ARCH_POSIX
CLoraTenant loraTenant{lora, loraBroadcastMessagePort};

CLoraFreqRequestTenant freqRequestTenant{ipAddrStr.c_str(), lora, radioModuleFrequencyCommandPort,
loraBroadcastMessagePort, K_SECONDS(15)};
#endif

CUdpListenerTenant commandListenerTenant{"Radio Module Command Listener Tenant", ipAddrStr.c_str(),
radioModuleCommandPort, &loraBroadcastMessagePort};
Expand Down
7 changes: 7 additions & 0 deletions app/ground/receiver_module/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ common:
- radio_module
tests:
ground.receiever_module.default: {}
ground.receiver_module.433mhz:
extra_overlay_confs:
- 433mhz.conf
ground.receiver_module.debug:
extra_overlay_confs:
- debug.conf
ground.receiver_module.debug_433mhz:
extra_overlay_confs:
- debug.conf
- 433mhz.conf
8 changes: 7 additions & 1 deletion app/ground/receiver_module/src/c_receiver_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@ static auto loraBroadcastMsgQueue = CMsgqMessagePort<LaunchLoraFrame>(broadcastQ
static auto udpBroadcastMsgQueue = CMsgqMessagePort<LaunchLoraFrame>(broadcastQueue);

CReceiverModule::CReceiverModule()
: CProjectConfiguration(), lora(*DEVICE_DT_GET(DT_ALIAS(lora))), loraBroadcastMessagePort(loraBroadcastMsgQueue),
: CProjectConfiguration(),
#ifndef CONFIG_ARCH_POSIX
lora(*DEVICE_DT_GET(DT_ALIAS(lora))),
#endif
loraBroadcastMessagePort(loraBroadcastMsgQueue),
udpBroadcastMessagePort(udpBroadcastMsgQueue) {}

void CReceiverModule::AddTenantsToTasks() {
// Networking
networkingTask.AddTenant(commandListenerTenant);
networkingTask.AddTenant(dataRequestListenerTenant);

#ifndef CONFIG_ARCH_POSIX
// LoRa
loraTenant.SetToGround();
loraTenant.RegisterFrameHandler(radioModuleFrequencyAckPort, freqRequestTenant);
loraTenant.RegisterDefaultFrameHandler(loraToUdpHandler);
loraTask.AddTenant(freqRequestTenant);
loraTask.AddTenant(loraTenant);
#endif
}

void CReceiverModule::AddTasksToRtos() {
Expand Down
7 changes: 6 additions & 1 deletion app/ground/receiver_module/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
LOG_MODULE_REGISTER(main);

int main() {
LOG_INF("Receiver starting");
#ifdef CONFIG_LICENSED_FREQUENCY
LOG_INF("Receiver boot: 433 MHz build");
#else
LOG_INF("Receiver boot: 915 MHz build");
#endif

static CReceiverModule receiverModule{};
receiverModule.AddTenantsToTasks();
receiverModule.AddTasksToRtos();
Expand Down
2 changes: 1 addition & 1 deletion app/payload/control_freak/flight-software/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sample:
description: control_freak
description: Control Freak flight software
name: control_freak
common:
build_only: true
Expand Down
6 changes: 0 additions & 6 deletions app/samples/lora_bcast/.idea/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions app/samples/lora_bcast/CMakeLists.txt

This file was deleted.

14 changes: 0 additions & 14 deletions app/samples/lora_bcast/Kconfig

This file was deleted.

31 changes: 0 additions & 31 deletions app/samples/lora_bcast/prj.conf

This file was deleted.

9 changes: 0 additions & 9 deletions app/samples/lora_bcast/sample.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions app/samples/lora_bcast/src/main.cpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "zephyr/logging/log.h"

#include <cstring>
#include <zephyr/net/net_ip.h>
#include <zephyr/posix/arpa/inet.h>

LOG_MODULE_REGISTER(CFrequencyChangeHandler);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cerrno>
#include <cstring>
#include <zephyr/logging/log.h>
#include <zephyr/net/net_ip.h>
#include <zephyr/posix/arpa/inet.h>

LOG_MODULE_REGISTER(CLoraFreqRequestTenant);

Expand Down
7 changes: 6 additions & 1 deletion snippets/sim-periph/sim-periph.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ CONFIG_FUSE_LIBRARY_V3=y
CONFIG_RTC_EMUL=y

# Networking
CONFIG_ETH_NATIVE_POSIX=n
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_NATIVE_OFFLOADED_SOCKETS=y
CONFIG_HEAP_MEM_POOL_SIZE=1024

# Driver-specific shell helpers are enabled by the debug/complete-shell snippets,
# but native_sim app configs may intentionally disable the corresponding drivers.
CONFIG_GPIO_SHELL=n
CONFIG_I2C_SHELL=n
CONFIG_SENSOR_SHELL=n
Loading