Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
thermal_ctl.c File Reference
#include "modules/digital_cam/thermal_ctl.h"
#include "modules/datalink/downlink.h"
#include "modules/datalink/extra_pprz_dl.h"
#include <stdio.h>
#include <string.h>
+ Include dependency graph for thermal_ctl.c:

Go to the source code of this file.

Data Structures

struct  thermal_spot
 

Macros

#define THERMAL_CTL_NONE   0
 
#define THERMAL_CTL_PWR_OFF   1
 
#define THERMAL_CTL_REC_ON   2
 
#define THERMAL_CTL_REC_OFF   3
 
#define NB_SPOTS   3
 

Functions

static void thermal_send_draw (struct thermal_spot *spot)
 
static void update_hottests (struct thermal_spot *spot)
 
void thermal_ctl_thermal_ctl_handler (float value)
 
void thermal_ctl_thermal_threshold_handler (float value)
 
void thermal_clusters_cb (uint8_t *buf)
 
void thermal_cluster_periodic ()
 

Variables

float thermal_ctl = 0
 
float thermal_threshold = 50
 
struct thermal_spot hottest_spots [3] = {0}
 

Detailed Description

Author
Fabien-B fabie.nosp@m.n-b@.nosp@m.githu.nosp@m.b.co.nosp@m.m

Control a thermal camera connected to a companion computer.

See https://github.com/enacuavlab/thermal_imav2026 for more information about the integration of a MLX90640 thermal camera.

Payload is controlled via PAYLOAD_COMMAND messages. Designed for IMAV2026 competition.

Definition in file thermal_ctl.c.


Data Structure Documentation

◆ thermal_spot

struct thermal_spot

Definition at line 50 of file thermal_ctl.c.

Data Fields
uint8_t cluster_idx
int count
int32_t lat
int32_t lon
float temp

Macro Definition Documentation

◆ NB_SPOTS

#define NB_SPOTS   3

Definition at line 48 of file thermal_ctl.c.

◆ THERMAL_CTL_NONE

#define THERMAL_CTL_NONE   0

Definition at line 43 of file thermal_ctl.c.

◆ THERMAL_CTL_PWR_OFF

#define THERMAL_CTL_PWR_OFF   1

Definition at line 44 of file thermal_ctl.c.

◆ THERMAL_CTL_REC_OFF

#define THERMAL_CTL_REC_OFF   3

Definition at line 46 of file thermal_ctl.c.

◆ THERMAL_CTL_REC_ON

#define THERMAL_CTL_REC_ON   2

Definition at line 45 of file thermal_ctl.c.

Function Documentation

◆ thermal_cluster_periodic()

void thermal_cluster_periodic ( void  )

Definition at line 163 of file thermal_ctl.c.

References thermal_spot::cluster_idx, foo, hottest_spots, NB_SPOTS, and thermal_send_draw().

+ Here is the call graph for this function:

◆ thermal_clusters_cb()

void thermal_clusters_cb ( uint8_t *  buf)

Definition at line 95 of file thermal_ctl.c.

References b, thermal_spot::cluster_idx, foo, thermal_send_draw(), and update_hottests().

+ Here is the call graph for this function:

◆ thermal_ctl_thermal_ctl_handler()

void thermal_ctl_thermal_ctl_handler ( float  value)

◆ thermal_ctl_thermal_threshold_handler()

void thermal_ctl_thermal_threshold_handler ( float  value)

Definition at line 87 of file thermal_ctl.c.

References extra_pprz_tp, foo, and thermal_threshold.

◆ thermal_send_draw()

static void thermal_send_draw ( struct thermal_spot *  spot)
static

Definition at line 148 of file thermal_ctl.c.

References DefaultChannel, DefaultDevice, foo, and status.

Referenced by thermal_cluster_periodic(), and thermal_clusters_cb().

+ Here is the caller graph for this function:

◆ update_hottests()

static void update_hottests ( struct thermal_spot *  spot)
static

Definition at line 121 of file thermal_ctl.c.

References foo, hottest_spots, NB_SPOTS, thermal_spot::temp, and thermal_threshold.

Referenced by thermal_clusters_cb().

+ Here is the caller graph for this function:

Variable Documentation

◆ hottest_spots

struct thermal_spot hottest_spots[3] = {0}

Definition at line 60 of file thermal_ctl.c.

Referenced by thermal_cluster_periodic(), and update_hottests().

◆ thermal_ctl

float thermal_ctl = 0

Definition at line 40 of file thermal_ctl.c.

◆ thermal_threshold

float thermal_threshold = 50

Definition at line 41 of file thermal_ctl.c.

Referenced by thermal_ctl_thermal_threshold_handler(), and update_hottests().