Add some print lines and a button to toggle terminal.
This commit is contained in:
parent
642e5b17c5
commit
d518d86bc2
|
@ -7,11 +7,13 @@ local t is BurnTime(n:MAG)/2.
|
||||||
|
|
||||||
lock STEERING to n:DELTAV.
|
lock STEERING to n:DELTAV.
|
||||||
wait until VectorAngle(SHIP:VELOCITY, STEERINGMANAGER:TARGET) <= 0.1.
|
wait until VectorAngle(SHIP:VELOCITY, STEERINGMANAGER:TARGET) <= 0.1.
|
||||||
|
|
||||||
|
print "Warping to node".
|
||||||
KUNIVERSE:WARP:WarpTo(n:TIME - t - 5).
|
KUNIVERSE:WARP:WarpTo(n:TIME - t - 5).
|
||||||
wait until n:ETA <= t.
|
wait until n:ETA <= t.
|
||||||
|
|
||||||
lock THROTTLE to 1.0.
|
lock THROTTLE to 1.0.
|
||||||
wait until n:DELTAV:MAG <= 0.1.
|
wait until n:DELTAV:MAG <= 0.1. // todo: pid loop here or no?
|
||||||
unlock THROTTLE.
|
unlock THROTTLE.
|
||||||
unlock STEERING.
|
unlock STEERING.
|
||||||
|
print "Node Executed. Have a nice day."
|
||||||
|
|
|
@ -11,7 +11,6 @@ parameter MINIMUM_PITCH is 5.
|
||||||
local ATMO_TWR is 1.6.
|
local ATMO_TWR is 1.6.
|
||||||
|
|
||||||
// Configure subsystems.
|
// Configure subsystems.
|
||||||
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
|
||||||
RCS off.
|
RCS off.
|
||||||
SAS off.
|
SAS off.
|
||||||
|
|
||||||
|
|
14
ui/rocket.ks
14
ui/rocket.ks
|
@ -12,6 +12,17 @@ function nodeButtonPressed {
|
||||||
run "execnode".
|
run "execnode".
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local termOn is false.
|
||||||
|
function terminalButtonPressed {
|
||||||
|
if termOn {
|
||||||
|
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Close Terminal").
|
||||||
|
set termOn to false.
|
||||||
|
} else {
|
||||||
|
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
||||||
|
set termOn to true.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Main UI.
|
// Main UI.
|
||||||
local interface is gui(200).
|
local interface is gui(200).
|
||||||
set interface:X to 200.
|
set interface:X to 200.
|
||||||
|
@ -44,6 +55,9 @@ set launchButton:onClick to launchButtonPressed@.
|
||||||
local nodeButton is interface:AddButton("Execute Node").
|
local nodeButton is interface:AddButton("Execute Node").
|
||||||
set nodeButton:onClick to nodeButtonPressed@.
|
set nodeButton:onClick to nodeButtonPressed@.
|
||||||
|
|
||||||
|
local termButton is interface:AddButton("Terminal").
|
||||||
|
set termButton:onClick to terminalButtonPressed@.
|
||||||
|
|
||||||
interface:show().
|
interface:show().
|
||||||
|
|
||||||
wait until false.
|
wait until false.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user