Skip to content

File syn_control_stats.c

FileList > control > syn_control_stats.c

Go to the source code of this file

  • #include "syntropic/control/syn_control_stats.h"
  • #include "syntropic/util/syn_assert.h"
  • #include <math.h>
  • #include <string.h>

Public Functions

Type Name
void syn_control_stats_report (const SYN_ControlStats * stats, SYN_ControlReport * report)
Calculate a report from the current accumulators.
void syn_control_stats_reset (SYN_ControlStats * stats)
Reset all accumulators.
void syn_control_stats_update (SYN_ControlStats * stats, int32_t error, int32_t output)
Update stats with a new sample.

Public Functions Documentation

function syn_control_stats_report

Calculate a report from the current accumulators.

void syn_control_stats_report (
    const SYN_ControlStats * stats,
    SYN_ControlReport * report
) 

Parameters:

  • stats Stats instance.
  • report Output report structure.

function syn_control_stats_reset

Reset all accumulators.

void syn_control_stats_reset (
    SYN_ControlStats * stats
) 

Parameters:

  • stats Stats instance to reset.

function syn_control_stats_update

Update stats with a new sample.

void syn_control_stats_update (
    SYN_ControlStats * stats,
    int32_t error,
    int32_t output
) 

Parameters:

  • stats Stats instance.
  • error Current servo error (target - measured).
  • output Current motor output (-100 to 100, or raw counts).


The documentation for this class was generated from the following file src/syntropic/control/syn_control_stats.c