PER Firmware
Loading...
Searching...
No Matches
bangbang.c File Reference

Generic bang-bang controller with hysteresis and minimum switch interval. More...

#include "bangbang.h"

Functions

void bangbang_update (bangbang_t *controller, float value, uint32_t current_time)
 Update the state of the bang-bang controller based on the input value and current time. It calls the appropriate on/off functions if the state changes.
 

Detailed Description

Generic bang-bang controller with hysteresis and minimum switch interval.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ bangbang_update()

void bangbang_update ( bangbang_t * controller,
float value,
uint32_t current_time )

Update the state of the bang-bang controller based on the input value and current time. It calls the appropriate on/off functions if the state changes.

Parameters
controllerPointer to the bang-bang controller.
valueThe current input value.
current_timeThe current time in milliseconds.