Jump to content

[Release - Final] kOSPropMonitor - IVA kOS Monitor


dsonbill

Recommended Posts

On 3/8/2021 at 5:50 PM, dsonbill said:

I'm currently researching a way to run kOS scripts from C#, which I think is what you're really after.  So you can run a script on start of the prop, or on button push.
Unfortunately this is going to be a bit more complex than I would have liked, but I think it's possible.

 

As for getting the active page, I'll look into it. The main issue is it would require a hard-link to RPM, which would break future MAS compatibility.

I think maybe you could do this by having the user attach a delegate to a known variable that’s part of your addon.  I think the kos-stockcamera mod does something similar.

Link to comment
Share on other sites

  • 8 months later...

Hey there,

I do use the modification for over an year now. Recently I updated to the newest version, I was way back ...

Since the update I'm not able to use my monitor scripts anymore, they just refuse to work. I know there where some changes which requires updating of the button usage but somehow I cannot get it into a working state.

Before the update I handelt button presses like this

 

global buttons is addons:kpm:buttons.

local mabort is false.
until mabort {
  if buttons:getstate(-4) {
	set mabort to true.
  }
}

Now I did try to use the delegate to print a text on the screen if a button is pressed but this is not working.

global buttons is addons:kpm:buttons.
local mabort it false.

buttons:setdelegate(-3, testing@).

until mabort {
}

function testing 
    print "Button pressed".
}

I did look into the github repository trying to understand how it was implemented in the mod itself and to check my id's. Since this looks fine I do not know what's the mistake.

Additionaly if I set a label on a flag like this I can retrive it but it is not shown on the monitor.

 

global flags is addons:kpm:flags.
flags:setlabel(0, "testing").
flags:setlabel(1, "testing").
flags:setlabel(2, "testing").
flags:setlabel(3, "testing").
flags:setlabel(-1, "testing").
print flags:getlabel(0).

 

Link to comment
Share on other sites

  • 6 months later...

Hey, I was just setting up a new install and I noticed that the version of kospropmonitor available to ckan is quite old.  Any plans on getting it updated?  If you want I can figure out what needs to be done too but I'd need your permission to get the ckan metadata updated.

Link to comment
Share on other sites

  • 3 months later...
On 5/30/2022 at 5:39 PM, JonnyOThan said:

Hey, I was just setting up a new install and I noticed that the version of kospropmonitor available to ckan is quite old.  Any plans on getting it updated?  If you want I can figure out what needs to be done too but I'd need your permission to get the ckan metadata updated.

See my previous post, the ZIP file is messed up:

If that can get fixed, nothing else would need to be done on the CKAN side.

Link to comment
Share on other sites

  • 10 months later...

Ok, I'm going to ask a potentially dumb question, and can later delete my post if I'm proven correct...

I'm thinking the overall functionality of this mod is now incompatible with most common IVAs?  It seems that even the old IVAs that used RPM are now running RPM "powered by" MAS.  

I can still use the terminal functionality with the keyboard by triple clicking the upper right button on the MFD but all of the button delegate, label get/set are not really compatible anymore.  

I am very appreciative of this mod while it lasted!  I just want to make sure I'm not missing something (after hours of toying with it) that can make it work on the current set of IVAs that are out there (I'm thinking most IVAs compatible with REVIVA).

@dsonbill @JonnyOThan @HebaruSan Thanks for all you do!!!

Matt

Edit: It still works... see below...

Edited by orionguy
Updated content
Link to comment
Share on other sites

On 7/18/2023 at 11:58 AM, orionguy said:

Ok, I'm going to ask a potentially dumb question, and can later delete my post if I'm proven correct...

I'm thinking the overall functionality of this mod is now incompatible with most common IVAs?  It seems that even the old IVAs that used RPM are now running RPM "powered by" MAS.  

I can still use the terminal functionality with the keyboard by triple clicking the upper right button on the MFD but all of the button delegate, label get/set are not really compatible anymore.  

I am very appreciative of this mod while it lasted!  I just want to make sure I'm not missing something (after hours of toying with it) that can make it work on the current set of IVAs that are out there (I'm thinking most IVAs compatible with REVIVA).

@dsonbill @JonnyOThan @HebaruSan Thanks for all you do!!!

Matt

Edit: It still works... see below...

 The buttons, labels, and flags definitely still work if everything is configured correctly.  I finally realized that the Patch.cfg needs to be edited to change the template equal to a template file that actually includes buttons and labels.  There is one on page 3 of this topic and I have included my own version at the bottom of this post.  Additionally, the monitor has to be set to currentmonitor before trying to handle the buttons, labels, and flags. 

Below is a quick script that gets the total number of monitors (which is 5 in my version of ProbeControlRoom) and loops through each monitor and then loops through all 14 buttons, labels, and flags to set each one.  The delegate that is assigned to each button just has it toggle the flag for the corresponding button (i.e. button 0 toggles flag 0 on and off).  

@lazyGlobal off.
local monitors to addons:kpm:getmonitorcount().
global mybuttons to addons:kpm:buttons.
global mylabels to addons:kpm:labels.
global myflags to addons:kpm:flags.
clearscreen.

FROM {local x is 0.} UNTIL x = monitors STEP {set x to x+1.} DO {
  set mybuttons:currentmonitor to x. 
  set mylabels:currentmonitor to x.
  set myflags:currentmonitor to x. 
  FROM {local y is 0.} UNTIL y=14 STEP {set y to y+1.} DO {
    mybuttons:setdelegate(y,toggleFlag@:BIND(y)). 
    mylabels:setlabel(y," LABEL"+y:tostring+" ").
    myflags:setlabel(y,"RUN"+y:tostring).
  }
}
function toggleFlag {
  parameter flagNum is 0.
  FROM {local x is 0.} UNTIL x = monitors STEP {set x to x+1.} DO { 
    set myflags:currentmonitor to x. 
    myflags:setstate(flagNum,not (myflags:getstate(flagNum))).
  }
}
UNTIL FALSE {}.

This is the template that I am using (you have to assign it in Patch.cfg)

[hw]   {buttonLabel0} | {buttonLabel1} | {buttonLabel2} | {buttonLabel3} | {buttonLabel4} | {buttonLabel5} |   EXIT[/hw]
[#60F8F9]CPU: {currentCPU}   [#60F8F9]ID: {GUID}   {keyboardFlag} 
[#60F8F9]FLAG   {flagLabel0} {flagLabel1} {flagLabel2} {flagLabel3} {flagLabel4} {flagLabel5} {flagLabel6}
[#60F8F9]PANEL  {flagLabel7} {flagLabel8} {flagLabel9} {flagLabel10} {flagLabel11} {flagLabel12} {flagLabel13}
{l1}
{l2}
{l3}
{l4}
{l5}
{l6}
{l7}
{l8}
{l9}
{l10}
{l11}
{l12}
{l13}
{l14}
{l15}
[hw]   {buttonLabel7} | {buttonLabel8} | {buttonLabel9} | {buttonLabel10} | {buttonLabel11} | {buttonLabel12} | {buttonLabel13}[/hw]

 

Link to comment
Share on other sites

  • 4 weeks later...

How can I make my terminal look like the following images from this thread? I think I need the Patch.cfg, template file, and any option about the terminal size in kOS.

3b967d62179d42258fc338cb2c6bafe6.png

EfSXgIS.jpg

I've been reading through this thread and trying myself but continue to get the higher resolution default screen with a font that is too small. I would just like it to match the font size around other displays in the cockpit. I have tried to swap out with the OriginalTerminal template and set in Patch.cfg, but the resolution in IVA does not seem to update. Any suggestions?

BTW: This mod is pretty great and just gives an infinite number of possibilities for using kOS. So thanks for the work on this.
 

Edited by routonmh
typo
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
On 2/4/2015 at 8:02 PM, dsonbill said:

Completely Customizable Text Colors

How do I change the text colors of a print command string?  Such as the "This is a test with color that changes back." example seen in the screenshot at the top of page 1?

Nevermind:  I think I've got it.

Either:

  • Include specific RBG into the text string, as follows:
    • “[#rrggbb]”
    • Example:  “[#4286f4]”
  • Include a pre-defined color into the text string, as follows:
    • “{COLOR}”

Known pre-defined colors:

  • “{COLOR}”                                                                The default green of text in the terminal
  • “{CUSTOM1}”, same as  “[#4286f4]”         A light blue
  • “{CUSTOM2}”, same as  “[#efce39]”          A light orange
  • “{CUSTOM3}”, same as  “[#9d39ef]”         Magenta purple
  • “{CUSTOM4}”, same as  “[#291fe2]”         Very dark blue that’s difficult to see on the black background

I figured this out from this post from the developer:

Edited by Poppa Wheelie
Found solution and included it, plus link to source.
Link to comment
Share on other sites

  • 4 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...