Skip to main content

pamoja_trigger_update

Function pamoja_trigger_update 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_trigger_update( trigger: *mut PamojaTrigger, reading: f32, ) -> PamojaEdge
Expand description

Feeds a reading to a trigger and returns the edge it caused.

§Returns

PamojaEdge::Set or PamojaEdge::Cleared the moment the state changes, and PamojaEdge::None while nothing changed or if trigger is null.

§Safety

trigger must be a live handle from a trigger constructor, or null.