Added external bool

pull/20/head
Manoel 2022-08-14 09:29:49 +02:00
rodzic a51d4ece52
commit a2d80f57ae
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
#include <string.h>
#include "horus_packet_v2.h"
#include "horus_common.h"
#include "config.h"
volatile uint16_t horus_v2_packet_counter = 0;
@ -69,9 +70,11 @@ size_t horus_packet_v2_create(uint8_t *payload, size_t length, telemetry_data *d
// custom_data_pointer += sizeof(ext_pressure_mbar);
if (pulse_counter_enabled) {
// Unit: total counts
uint16_t ext_total_counts = (uint16_t) data->pulse_counts;
memcpy(custom_data_pointer, &ext_total_counts, sizeof(ext_total_counts));
uint16_t ext_total_counts = (uint16_t) data->pulse_counts;
memcpy(custom_data_pointer, &ext_total_counts, sizeof(ext_total_counts));
}
horus_packet.Checksum = (uint16_t) calculate_crc16_checksum((char *) &horus_packet,
sizeof(horus_packet) - sizeof(horus_packet.Checksum));

Wyświetl plik

@ -19,6 +19,7 @@ extern bool leds_enabled;
extern bool gps_nmea_output_enabled;
extern bool bmp280_enabled;
extern bool si5351_enabled;
extern bool pulse_counter_enabled;
extern volatile bool system_initialized;