43#define THERMAL_CTL_NONE 0
44#define THERMAL_CTL_PWR_OFF 1
45#define THERMAL_CTL_REC_ON 2
46#define THERMAL_CTL_REC_OFF 3
83 DOWNLINK_SEND_PAYLOAD_COMMAND(
extra_pprz_tp, EXTRA_DOWNLINK_DEVICE, &dst_id, 2, tab);
89 uint8_t kind = value > 0 ?
'h':
'c';
92 DOWNLINK_SEND_PAYLOAD_COMMAND(
extra_pprz_tp, EXTRA_DOWNLINK_DEVICE, &dst_id, 2, tab);
99 int nb = pprzlink_get_PAYLOAD_FLOAT_values_length(buf);
100 if (nb != 8) {
return; }
102 float*
b = pprzlink_get_DL_PAYLOAD_FLOAT_values(buf);
106 memcpy(data,
b, 8*
sizeof(
float));
110 .cluster_idx = data[0] + 1,
111 .lat = data[4] * 1e7,
112 .lon = data[5] * 1e7,
150 uint8_t color = 0 << 6 | 5 << 3 | 5;
156 int nb_text = snprintf(text, 10,
"%.0fC (%d)", spot->
temp, spot->
count);
159 &
status, &radius, 1, &spot->
lat, 1, &spot->
lon, nb_text, text);
164 static int hottest_idx = 0;
168 hottest_idx = (hottest_idx + 1) %
NB_SPOTS;
Common code for AP and FBW telemetry.
void thermal_ctl_thermal_ctl_handler(float value)
static void update_hottests(struct thermal_spot *spot)
void thermal_clusters_cb(uint8_t *buf)
void thermal_ctl_thermal_threshold_handler(float value)
static void thermal_send_draw(struct thermal_spot *spot)
#define THERMAL_CTL_REC_OFF
struct thermal_spot hottest_spots[3]
#define THERMAL_CTL_REC_ON
#define THERMAL_CTL_PWR_OFF
void thermal_cluster_periodic()
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.