Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tilt APIs

tilt API More...

Data Structures

struct  algorithm_tilt_config
 
struct  algorithm_tilt_data
 

Macros

#define ALGORITHM_TILT_DEFINE(name, loggers_, tdfs, filter_alpha, one_g_valid_percent)
 Statically define an instance of the tilt algorithm.
 

Enumerations

enum  { ALGORITHM_TILT_LOG_ANGLE = BIT(0) }
 

Functions

void algorithm_tilt_fn (const struct zbus_channel *chan, const void *config, void *data)
 Algorithm implementation, see algorithm_run_fn.
 

Detailed Description

tilt API

Macro Definition Documentation

◆ ALGORITHM_TILT_DEFINE

#define ALGORITHM_TILT_DEFINE ( name,
loggers_,
tdfs,
filter_alpha,
one_g_valid_percent )

#include <infuse/algorithm_runner/algorithms/tilt.h>

Value:
static const struct algorithm_tilt_config name##_config = { \
.common = \
{ \
.algorithm_id = 0x15F20001, \
.zbus_channel = INFUSE_ZBUS_CHAN_IMU, \
.state_size = sizeof(struct algorithm_tilt_data), \
.logging = \
{ \
.loggers = loggers_, \
.tdf_mask = tdfs, \
}, \
}, \
.iir_filter_alpha = filter_alpha, \
.one_g_percent = one_g_valid_percent, \
}; \
static struct algorithm_tilt_data name##_data; \
static struct algorithm_runner_algorithm name = { \
.impl = algorithm_tilt_fn, \
.config = &name##_config.common, \
.runtime_state = &name##_data, \
}
@ INFUSE_ZBUS_CHAN_IMU
Data type: imu_sample_array.
Definition channels.h:52
void algorithm_tilt_fn(const struct zbus_channel *chan, const void *config, void *data)
Algorithm implementation, see algorithm_run_fn.
Definition runner.h:60
Definition tilt.h:39
struct algorithm_runner_common_config common
Common algorithm configuration.
Definition tilt.h:41
Definition tilt.h:48

Statically define an instance of the tilt algorithm.

Parameters
nameVariable name base
loggers_TDF loggers to log outputs to
tdfsTDFs to log
filter_alphaIIR filter alpha parameter
one_g_valid_percentAccelerometer magnitude must be with N percent of 1G to use for tilt

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <infuse/algorithm_runner/algorithms/tilt.h>

Enumerator
ALGORITHM_TILT_LOG_ANGLE 

Function Documentation

◆ algorithm_tilt_fn()

void algorithm_tilt_fn ( const struct zbus_channel * chan,
const void * config,
void * data )

#include <infuse/algorithm_runner/algorithms/tilt.h>

Algorithm implementation, see algorithm_run_fn.