Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing. #3076

Open
AlexBeez opened this issue Jan 8, 2023 · 1 comment
Open

KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing. #3076

AlexBeez opened this issue Jan 8, 2023 · 1 comment
Milestone

Comments

@AlexBeez
Copy link

AlexBeez commented Jan 8, 2023

Context: I'm experimenting with control schemes for stuff, and I thought a plane would be a good place to start.

My intent was to lock the roll PID setpoint to the yaw error so that it would roll automatically during turns.

I'm not particularly up for code review - this is just me having fun exploring what I can do with the software. I'm only reporting because the error told me to.

Mod version: 1:1.3.2.0 (latest according to CKAN).

Terminal log:

run airplanelock.ks.
0
KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing.
Contact the kOS devs. This message should 'never' happen.


       VERBOSE DESCRIPTION

KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing.
Contact the kOS devs. This message should 'never' happen.



At Cockpit:/airplanelock.ks, line 19
set rll:setpoint to point.
^

Script contents:

set hdg to 90.
set alt to 16000.
lock point to steeringmanager:yawerror.
lock rll to steeringmanager:rollpid.
print point.
set spd to 1400.
declare global active to 1.
set queue to core:messages.
declare global received to list(0,0).

until active = 0 {
if not queue:empty {
if queue:peek[0] = "hdg" {
print "heading received!".
}
}

set rll:setpoint to point.
wait 0.5.

}

@nuggreat
Copy link

nuggreat commented Jan 8, 2023

You can't set the suffix of something you have locked. Also as the PIDs returned from the steering manager are refferences you don't need to lock them to keep the data fresh.

Also while this is an interesting idea for yaw control it wouldn't work because kOS will internally set the setpoint of the PIDs each tick so you changing the setpoint won't have any impact on how kOS steers. You would be better off setting the 3rd optional parameter of the HEADING() function if you want to define a desired roll.

EDIT: this is a duplicate of issue #3005 which is resolved by PR #3010 which is merged into the dev branch and just waiting for a kOS release to get to the rest of us.

@JonnyOThan JonnyOThan added this to the 1.5.0.0 milestone Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants