Mod Library
Sun Devil Rocketry's hardware agnostic utility library
Loading...
Searching...
No Matches
telemetry.c File Reference

: Module for LoRa (wireless) communication. More...

#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "main.h"
#include "math_sdr.h"
#include "commands.h"
#include "error_sdr.h"
#include "debug_sdr.h"
#include "telemetry.h"
#include "lora.h"

Functions

void telemetry_get_next_message (TELEMETRY_MESSAGE *payload)
 Selects and constructs the next scheduled telemetry message.
void telemetry_build_payload (TELEMETRY_MESSAGE *msg_buf, TELEMETRY_MESSAGE_TYPES message_type)
 Builds the requested telemetry payload and fills its message header.

Variables

PRESET_DATA preset_data
SENSOR_DATA sensor_data

Detailed Description

: Module for LoRa (wireless) communication.

Copyright (c) 2025 Sun Devil Rocketry. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is covered under the BSD-3-Clause.

https://opensource.org/license/bsd-3-clause

Function Documentation

◆ telemetry_build_payload()

void telemetry_build_payload ( TELEMETRY_MESSAGE * msg_buf,
TELEMETRY_MESSAGE_TYPES message_type )

Builds the requested telemetry payload and fills its message header.

Builds a telemetry payload of the requested type.

Parameters
msg_bufTelemetry message buffer to fill.
message_typeType of telemetry message to build.

Builds the requested telemetry payload and fills its message header.

Parameters
msg_bufTelemetry message buffer to fill.
message_typeType of telemetry message to build.

In order to support projects with safety critical requirements, mod does not throw fail-fast errors. Thus, this should nop on release builds.

This ensures that the library will only fail fast in the event of a hardfault and enables it to offload FHA requirements to the project that integrates it, if needed.

GCOVR_EXCL_START

A coverage hole is reported here because the debug-mode emulator tests have an actual function call here while release does not. This branch is tested in the release configuration.

◆ telemetry_get_next_message()

void telemetry_get_next_message ( TELEMETRY_MESSAGE * payload)

Selects and constructs the next scheduled telemetry message.

Constructs the next telemetry message.

Parameters
payloadTelemetry message buffer to fill.

Selects and constructs the next scheduled telemetry message.

Parameters
payloadTelemetry message buffer to fill.