Speeduino
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
table2d.h File Reference
#include <stdint.h>
#include <Arduino.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  table2D< axis_t, value_t, sizeT >
 A 2D table. More...
 

Typedefs

using table2D_i8_u8_4 = table2D< int8_t, uint8_t, 4U >
 
using table2D_u8_u8_4 = table2D< uint8_t, uint8_t, 4U >
 
using table2D_u8_u8_6 = table2D< uint8_t, uint8_t, 6U >
 
using table2D_u8_u8_8 = table2D< uint8_t, uint8_t, 8U >
 
using table2D_u8_u8_9 = table2D< uint8_t, uint8_t, 9U >
 
using table2D_u8_u8_10 = table2D< uint8_t, uint8_t, 10U >
 
using table2D_u16_u8_32 = table2D< uint16_t, uint8_t, 32U >
 
using table2D_u16_u16_32 = table2D< uint16_t, uint16_t, 32U >
 
using table2D_u8_u16_4 = table2D< uint8_t, uint16_t, 4U >
 
using table2D_u8_s16_6 = table2D< uint8_t, int16_t, 6U >
 

Functions

template<typename axis_t , typename value_t , uint8_t sizeT>
static value_t table2D_getValue (const table2D< axis_t, value_t, sizeT > *fromTable, const axis_t axisValue)
 Interpolate a value from a 2d table.
 

Typedef Documentation

◆ table2D_i8_u8_4

◆ table2D_u16_u16_32

◆ table2D_u16_u8_32

◆ table2D_u8_s16_6

◆ table2D_u8_u16_4

◆ table2D_u8_u8_10

◆ table2D_u8_u8_4

◆ table2D_u8_u8_6

◆ table2D_u8_u8_8

◆ table2D_u8_u8_9

Function Documentation

◆ table2D_getValue()

template<typename axis_t , typename value_t , uint8_t sizeT>
static value_t table2D_getValue ( const table2D< axis_t, value_t, sizeT > *  fromTable,
const axis_t  axisValue 
)
inlinestatic

Interpolate a value from a 2d table.

Template Parameters
axis_tThe type of the table axis
value_tThe type of the table values
sizeTThe size of the table (number of axis and value elements)
Parameters
fromTablethe table to get the value from
axisValuethe value to look up in the table axis
Returns
value_t table value corresponding to the axis value (possibly interpolated)
Here is the call graph for this function:
Here is the caller graph for this function: