Changed snake-case variables to camel-case
This commit is contained in:
parent
cf4ebc0200
commit
ab9bb4d391
@ -3,59 +3,59 @@
|
|||||||
# and a Kit (Button, moment type) to trigger purge.
|
# and a Kit (Button, moment type) to trigger purge.
|
||||||
# Gas mixer ratio is manually set!
|
# Gas mixer ratio is manually set!
|
||||||
|
|
||||||
alias tank_a d0
|
alias TankA d0
|
||||||
alias tank_b d1
|
alias TankB d1
|
||||||
alias tank_out d2
|
alias TankOut d2
|
||||||
alias mixer d3
|
alias Mixer d3
|
||||||
alias pump d4
|
alias Pump d4
|
||||||
alias button d5
|
alias Button d5
|
||||||
|
|
||||||
alias tank_a_press r0
|
alias TankAPress r0
|
||||||
alias tank_b_press r1
|
alias TankBPress r1
|
||||||
alias tank_out_press r2
|
alias TankOutPress r2
|
||||||
alias tank_a_ok r3
|
alias TankAOk r3
|
||||||
alias tank_b_ok r4
|
alias TankBOk r4
|
||||||
alias tank_out_ok r5
|
alias TankOutOk r5
|
||||||
alias mixer_run r6
|
alias MixerRun r6
|
||||||
alias purge_activate r7
|
alias PurgeActivate r7
|
||||||
|
|
||||||
define PRESS_IN_MIN 500 # 500kPa
|
define PRESS_IN_MIN 500 # 500kPa
|
||||||
define PRESS_OUT_MAX 2000 # 2MPa
|
define PRESS_OUT_MAX 2000 # 2MPa
|
||||||
|
|
||||||
# Sets purge pump to max output
|
# Sets purge pump to max output
|
||||||
l tank_a_press pump Maximum
|
l TankAPress Pump Maximum
|
||||||
s pump Setting tank_a_press
|
s Pump Setting TankAPress
|
||||||
|
|
||||||
start:
|
start:
|
||||||
yield
|
yield
|
||||||
s pump On 0 # Ensures purge pump is off
|
s Pump On 0 # Ensures purge pump is off
|
||||||
# Checks is purge is activated
|
# Checks is purge is activated
|
||||||
l purge_activate button Setting
|
l PurgeActivate Button Setting
|
||||||
bgtz purge_activate purge
|
bgtz PurgeActivate purge
|
||||||
|
|
||||||
# Loads tank pressures
|
# Loads tank pressures
|
||||||
l tank_a_press tank_a Pressure
|
l TankAPress TankA Pressure
|
||||||
l tank_b_press tank_b Pressure
|
l TankBPress TankB Pressure
|
||||||
l tank_out_press tank_out Pressure
|
l TankOutPress TankOut Pressure
|
||||||
|
|
||||||
# Checks if pressures are within tolerances
|
# Checks if pressures are within tolerances
|
||||||
sgt tank_a_ok tank_a_press PRESS_IN_MIN
|
sgt TankAOk TankAPress PRESS_IN_MIN
|
||||||
sgt tank_b_ok tank_b_press PRESS_IN_MIN
|
sgt TankBOk TankBPress PRESS_IN_MIN
|
||||||
slt tank_out_ok tank_out_press PRESS_OUT_MAX
|
slt TankOutOk TankOutPress PRESS_OUT_MAX
|
||||||
|
|
||||||
and mixer_run tank_a_ok tank_b_ok
|
and MixerRun TankAOk TankBOk
|
||||||
and mixer_run tank_out_ok mixer_run
|
and MixerRun TankOutOk MixerRun
|
||||||
|
|
||||||
# Activates mixer if all is ok
|
# Activates mixer if all is ok
|
||||||
s mixer On mixer_run
|
s Mixer On MixerRun
|
||||||
j start
|
j start
|
||||||
|
|
||||||
purge:
|
purge:
|
||||||
yield
|
yield
|
||||||
s mixer On 0 # Turns mixer off
|
s Mixer On 0 # Turns mixer off
|
||||||
# Gets output tank pressure
|
# Gets output tank pressure
|
||||||
l tank_out_press tank_out Pressure
|
l TankOutPress TankOut Pressure
|
||||||
s pump On 1 # Activates purge pump
|
s Pump On 1 # Activates purge pump
|
||||||
# Runs pump until tank is empty
|
# Runs pump until tank is empty
|
||||||
bgtz tank_out_press purge
|
bgtz TankOutPress purge
|
||||||
j start
|
j start
|
Loading…
Reference in New Issue
Block a user