|
Lamp-Da 0.1
A compact lantern project
|
This alert is raised when the battery level falls below a critical threshold. Falling further will dammage the battery. More...
Public Member Functions | |
| bool | should_be_raised () const override |
| return true if this alert type should be raised | |
| bool | should_be_cleared () const override |
| return true if this alert type should be cleared | |
| uint32_t | alert_shutdown_timeout () const override |
| If this alert is raised, system should turn off fast. | |
| bool | show () const override |
| display this alert on the indicator | |
| Type | get_type () const override |
| return the Defined type of this alert | |
| virtual void | execute () const |
| function executed when this alert is raised | |
| virtual bool | should_shutdown_system (const uint32_t time) final |
| Return true if the system should shutdown from this alert. | |
| virtual bool | handle_raised_state (const uint32_t time) |
| Handler for the raised state of the alert. If the alert is not raised, raise the alert. | |
| void | update_raise_time (const uint32_t time) |
| Update the raised time of this alert. An alert continuously firing as to be updated. | |
| virtual bool | handle_lowered_state (const uint32_t time) |
| Handler for the lowered state of the alert. If the alert is raised, lower the alert. | |
| virtual bool | should_prevent_lamp_output () const |
| override to prevent lamp output power if this alert if raised. Default to False | |
| virtual bool | should_prevent_battery_charge () const |
| override to prevent battery charge if this alert if raised. Default to False | |
| virtual bool | should_prevent_usb_port_use () const |
| override to prevent USB port usage if this alert if raised. Default to False | |
This alert is raised when the battery level falls below a critical threshold. Falling further will dammage the battery.
|
inlineoverridevirtual |
If this alert is raised, system should turn off fast.
Reimplemented from lampda::logic::alerts::AlertBase.
|
inlinevirtualinherited |
function executed when this alert is raised
Reimplemented in lampda::logic::alerts::Alert_BatteryLow, and lampda::logic::alerts::Alert_TempTooHigh.
|
inlineoverridevirtual |
return the Defined type of this alert
Implements lampda::logic::alerts::AlertBase.
|
inlinevirtualinherited |
Handler for the lowered state of the alert. If the alert is raised, lower the alert.
|
inlinevirtualinherited |
Handler for the raised state of the alert. If the alert is not raised, raise the alert.
|
inlineoverridevirtual |
return true if this alert type should be cleared
Reimplemented from lampda::logic::alerts::AlertBase.
|
inlineoverridevirtual |
return true if this alert type should be raised
Reimplemented from lampda::logic::alerts::AlertBase.
|
inlinevirtualinherited |
override to prevent battery charge if this alert if raised. Default to False
Reimplemented in lampda::logic::alerts::Alert_BatteryReadingIncoherent, lampda::logic::alerts::Alert_BatteryMissing, lampda::logic::alerts::Alert_TempCritical, lampda::logic::alerts::Alert_HardwareAlert, lampda::logic::alerts::Alert_SystemShutdownFailed, lampda::logic::alerts::Alert_SystemInErrorState, and lampda::logic::alerts::Alert_UsbPortShort.
|
inlinevirtualinherited |
override to prevent lamp output power if this alert if raised. Default to False
Reimplemented in lampda::logic::alerts::Alert_BatteryReadingIncoherent, lampda::logic::alerts::Alert_BatteryMissing, lampda::logic::alerts::Alert_TempCritical, lampda::logic::alerts::Alert_HardwareAlert, lampda::logic::alerts::Alert_OtgFailed, lampda::logic::alerts::Alert_SystemShutdownFailed, and lampda::logic::alerts::Alert_SystemInErrorState.
|
inlinevirtualinherited |
override to prevent USB port usage if this alert if raised. Default to False
Reimplemented in lampda::logic::alerts::Alert_BatteryReadingIncoherent, lampda::logic::alerts::Alert_BatteryMissing, lampda::logic::alerts::Alert_TempCritical, lampda::logic::alerts::Alert_HardwareAlert, lampda::logic::alerts::Alert_SystemShutdownFailed, lampda::logic::alerts::Alert_SystemInErrorState, and lampda::logic::alerts::Alert_UsbPortShort.
|
inlineoverridevirtual |
display this alert on the indicator
Reimplemented from lampda::logic::alerts::AlertBase.