apc
Procs | |
autoset | Returns the new status value for an APC channel. |
---|---|
check_updates | Checks for what icon updates we will need to handle |
setsubsystem | Used by external forces to set the APCs channel status's. |
Proc Details
autoset
Returns the new status value for an APC channel.
// val 0=off, 1=off(auto) 2=on 3=on(auto) // on 0=off, 1=on, 2=autooff TODO: Make this use bitflags instead. It should take at most three lines, but it's out of scope for now.
Arguments:
- val: The current status of the power channel.
- APC_CHANNEL_OFF: The APCs channel has been manually set to off. This channel will not automatically change.
- APC_CHANNEL_AUTO_OFF: The APCs channel is running on automatic and is currently off. Can be automatically set to APC_CHANNEL_AUTO_ON.
- APC_CHANNEL_ON: The APCs channel has been manually set to on. This will be automatically changed only if the APC runs completely out of power or is disabled.
- APC_CHANNEL_AUTO_ON: The APCs channel is running on automatic and is currently on. Can be automatically set to APC_CHANNEL_AUTO_OFF.
- on: An enum dictating how to change the channel's status.
- AUTOSET_FORCE_OFF: The APC forces the channel to turn off. This includes manually set channels.
- AUTOSET_ON: The APC allows automatic channels to turn back on.
- AUTOSET_OFF: The APC turns automatic channels off.
check_updates
Checks for what icon updates we will need to handle
setsubsystem
Used by external forces to set the APCs channel status's.
Arguments:
- val: The desired value of the subsystem:
- 1: Manually sets the APCs channel to be APC_CHANNEL_OFF.
- 2: Manually sets the APCs channel to be APC_CHANNEL_AUTO_ON. If the APC doesn't have any power this defaults to APC_CHANNEL_OFF instead.
- 3: Sets the APCs channel to be APC_CHANNEL_AUTO_ON. If the APC doesn't have enough power this defaults to APC_CHANNEL_AUTO_OFF instead.