Skip to content

Instantly share code, notes, and snippets.

@RevoluPowered
Created February 15, 2023 22:51
Show Gist options
  • Save RevoluPowered/0f537961257e184ba2f08e69c5d96aba to your computer and use it in GitHub Desktop.
Save RevoluPowered/0f537961257e184ba2f08e69c5d96aba to your computer and use it in GitHub Desktop.
alias AK db
alias PressureValue r0
alias OutPressure r1
alias OutPressure2 r2
alias InputPressure r3
alias p1 r4
alias p2 r5
alias p3 r6
alias p4 r7
define MaximumPressure 40000
mainloop:
yield
l OutPressure AK PressureOutput
l OutPressure2 AK PressureOutput2
l InputPressure AK PressureInput
# Make sure pump is in correct state
move p1 0
move p2 0
move p3 0
move p4 0
slt p1 OutPressure MaximumPressure
slt p2 OutPressure2 MaximumPressure
and p3 p1 p2
sgt p4 InputPressure 0
and p1 p3 p4
s db Setting p1
s AK Mode p1
j mainloop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment