Code Monkey home page Code Monkey logo

kerbalsimpitrevamped's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kerbalsimpitrevamped's Issues

[BUG]: SAS turns off without inputs

Description of the bug

Several users report some cases of SAS turning itself off without any inputs.

Nothing seems to appear in the logs when it happens. It seems to happen only when SimPit is installed and has been reported even when no controller is plugged in. It happens even if the controller does not send any command (meaning it is probably not a command that is badly interpreted).

No instance of SAS turning itself on has been reported.

How to reproduce

Not clear yet

[Feature]: Add G Forces data outbound messages

Is your feature request related to a problem? Please describe.


I'm trying to port functionality from SerialIO to KerbalSimpit for my new controller, and I've noticed the lack of G forces info.

I would like to monitor G forces on my controller (eventually maybe have a dedicated display for it).


Describe the solution you'd like

I would like to be able to subscribe to a GFORCE_MESSAGE channel, or have G Force (acceleration) info sent in another existing channel (FLIGHT_STATUS_MESSAGE).


Using existing channels seems like a good idea, the API should already publish the data, as SerialIO implements it already.


Describe alternatives you've considered


N/A


FLIGHT_STATUS_MESSAGE, etc, don't publish acceleration/G forces data.


Maybe the acceleration data can be added to the FLIGHT_STATUS_MESSAGE channel. Seems like a good place for it.


Additional context


Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!

Maybe it can be added to the flightStatusMessage struct:

{
byte flightStatusFlags; /< Different booleans as defined by FligthStatusFlags. You can access them with the helper funtions.*/
...
float gForces; /
< Current experienced G forces on vessel */
byte currentStage; /**< Current stage of the vessel (also the total number of stage remaining). Decreased by one at each staging.
...
} attribute((packed));

[Feature]: Add message to see if active vessel has target or not

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently there is no way to check if the active vessel has a target or not. This makes it difficult to know when to use the velocity data from the targetInfo channel vs the regular velocity channel

What is the issue that you are facing, that you would like resolved? How would it benefit players?

This could for example be resolved by adding another item to the info sent by the FLIGHT_STATUS_MESSAGE. An additional function like has_active_target() which returns true or false depending on whether there is an active target or not.
This would be beneficial in the sense that it would greatly simplify the code needed to decide when to output target information, or when to output some type of "no target data available" indicator.

Is it an existing/new feature in the game that would benefit from support by this mod?

Any display of target information that wants to display if there is or isn't an active target would find this improvement very useful.

Describe the solution you'd like

A clear and concise description of what you want to happen.

Ideally there would be a helper function you can call after parsing the message, which simply returns true if the active vessel has a target, and false otherwise.

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

This could at worst require another channel, that sends a message whenever the target status changes, but it could also be simply implemented into existing channels like FLIGHT_STATUS_MESSAGE.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Ive considered monitoring the target data to try to reason if there is an active target or not, but it seems that most of the time, wen there is no target, the target data is gibberish anyways.

What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do?

The fact that there is no way to get this information from the current channels

What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?

The helper functions for the Custom Action Groups channel are the closest thing. They return true or false depending on the state of the custom action group in the active vessel.

Additional context


Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!

[Feature]: change port name while KSP is running

Currently, the port name(s) are read while KSP is loading, and cannot be changed while KSP is running.

This means relaunching KSP to change the config, especially if the port name was not correctly set or if a new controller is connected.

The idea would be to either add a way to set the com port with the GUI, or add a button to reload the config file and update everything within SimPit

[Feature]: Add messages to set/get the navball speed display mode

The FlightGlobals API defines a Enum related to the speed display mode of the navball (orbit, surface or target) and some functions to get/set it. The idea is to use this API to have a message that set the mode to a given value and another to sent the current mode to the Arduino.

Those two messages will be simple (a single byte each). The message from KSP to Arduino can be only sent when there is a change (like the AG messages).

This is a good first issue as there is a lot of example of how to handle both inbound and outbound messages and the KSP API seems straightforward.

[BUG]: Shift modifier for keyboard emulation does not work for some features

Description of the bug

Mod version: Alpha-4

Game version: 1.10

Operating system: Win10

Microprocessor/s in use: Arduino

Symptoms

When using the keyboard emulation function, I'd like to cycle through planets in map view. It is done by pressing Tab to cycle the view center or Shit+Tab to cycle in reverse order.

This Arduino code cycle through them by emulating a tab press when used in map view.

keyboardEmulatorMessage keyMsg(0x09);
mySimpit.send(KEYBOARD_EMULATOR, keyMsg);

This Arduino code should cycle in reverse order. It cycle in the usual order, as if the SHIFT modifier is not used.

keyboardEmulatorMessage keyMsg(0x09, SHIFT_MOD)
mySimpit.send(KEYBOARD_EMULATOR, keyMsg);

This Arduino code, when used with the cursor in the console, print a capital 'C'. So the SHIFT modifier works for some use and do not use for other.

keyboardEmulatorMessage keyMsg(0x43, SHIFT_MOD);
mySimpit.send(KEYBOARD_EMULATOR, keyMsg);

Tentative of resolution

The C# code that emulate the SHIFT press is :

input.Keyboard.KeyDown(VirtualKeyCode.SHIFT);

Replacing by those lines did not work (the hypothesis was that a right shift was emulated instead of a left shift that is the only key working in KSP for this purpose).

input.Keyboard.KeyDown(VirtualKeyCode.RSHIFT);
input.Keyboard.KeyDown(VirtualKeyCode.LSHIFT);

[BUG]: CAG not behaving consistently when empty

Tested on latest version of Simpit, KSP1.12 w/ AGExt. Reported by @CodapopKSP

Using the logging, you can see the difference in behavior between AG1-10 and AG11+.

If you put a craft on the pad and a craft on the runway, both with nothing assigned to action groups, and then run that code and have it activate the CAG in the setup, then switch between the two, you'll see a few things:

  • AG 1-10 cannot be activated using the arduino if they're empty, but they can be activated using the keyboard. But when switching to the other craft, they turn OFF appropriately, and when returning to the first craft, they turn back ON appropriately. The issue here is they can only be activated by the controller if they are populated.
  • The bigger issue is that turning on AG 11+ on one craft and then switching to the other craft reveals them to still be turned on, but only if they're empty. If they're populated, then I believe they all function properly.

So all AGs function properly when populated on both crafts.
AG 1-10 are unable to be activated by controller if unpopulated (maybe a feature more than a bug)
AG 11+ can be activated but don't change state when switching craft if unpopulated
AG 11+ also automatically turn off when exiting flight even if there is no scene change message.

Here is a script to reproduce it

#include "KerbalSimpit.h"

KerbalSimpit mySimpit(Serial);
unsigned long lastDebounceTime_w = 0;

bool Action_Dspl_b[10] = {};
bool Action2_Dspl_b[10] = {};

void setup() {
  Serial.begin(115200);
  while (!mySimpit.init()) {delay(100);}
  mySimpit.printToKSP("Connected", PRINT_TO_SCREEN);

  mySimpit.inboundHandler(messageHandler);
  mySimpit.registerChannel(CAGSTATUS_MESSAGE);

  delay(1000);

  mySimpit.toggleCAG(2);
  mySimpit.toggleCAG(3);
  mySimpit.toggleCAG(12);
  mySimpit.toggleCAG(13);
}

void loop() {
  mySimpit.update();

  if ((millis() - lastDebounceTime_w) > 1000) {
    for (int i = 0; i < 4; i++) {
      mySimpit.printToKSP("AG" + String(i) + ": " + String(Action_Dspl_b[i]), PRINT_TO_SCREEN);
      //mySimpit.printToKSP("AG2" + String(i+10) + ": " + String(Action2_Dspl_b[i]), PRINT_TO_SCREEN);
    }
    lastDebounceTime_w = millis();
  }
}


void messageHandler(byte messageType, byte msg[], byte msgSize) {
  switch(messageType) {
    case CAGSTATUS_MESSAGE:
      if (msgSize == sizeof(cagStatusMessage)) {
        cagStatusMessage myAG;
        myAG = parseCAGStatusMessage(msg);
        for (int i = 1; i < 11; i++) {
          Action_Dspl_b[i] = (myAG.is_action_activated(i));
          Action2_Dspl_b[i] = (myAG.is_action_activated(i+10));
        }
      }
      break;
  }
}

[Feature]: Xenon Gas Message Channels

Describe the solution you'd like

Complete the resource messages, by adding Xenon gas channels, one for Total and one for stage. Each channel, similarly to every other resource channel, will contain a resourceMessage struct. It can then be parsed using the parseResource function, to be further processed.

Describe alternatives you've considered

I have not considered an alternative other than adding additional channels to register to.

Additional context
Nothing more to add, other than that i envision we will be able to do everything we can already do with other resources, with Xenon gas.

123617924_1646446018870818_5682632538642142177_n

[BUG]: No SOI message at initialisation

Based on a report on GitHub : when using the SOI message, it is sent when the SOI change but it is undefined until the first SOI change.

If you launch KSP and load a game, no SOI message is send until a SOI change happen. This prevent displaying the current SOI when the game is launched.

[Feature]:

Is your feature request related to a problem? Please describe.

not a problem as such, but a desire to see what the game thinks the user input is and to see what the game wishes to do prior to user input - the goal is to all feedback on controller, either visual or physical

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

currently the player can send messages to set the control axis, including the throttle, but has no way of knowing what value actually is set - e.g. when mechjeb is flying the control axis and throttle will adjust but there is no way to show this on a controller

What is the issue that you are facing, that you would like resolved? How would it benefit players?

situations where autopilot or game input (mechjeb or SAS) change control axis do not provide feedback - this can be seen on screen but it would be ideal to have all axis and throttles available to a controller

Is it an existing/new feature in the game that would benefit from support by this mod?

think this is just existing stuff

Describe the solution you'd like

A clear and concise description of what you want to happen.

the addition of several message channels to which a controller can subscribe - so that as well as being able to send a rotationMessage, it is possible to request a rotationMessage to be sent back - ideally two such, one for before the player input is added and one for after the player input is added.

this for the following

  • rotationMessage
  • translationMessage
  • customAxisMessage
  • wheelMessage
  • throttleMessage

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

pure channel registration to request feedback on the above message channels, no UI changes required

suggest the data is captured in the code that performs the adjustments, before and after, then as usual only sent if something has changed


Describe alternatives you've considered


A clear and concise description of any alternative solutions or features you've considered.

storing the values sent locally sort of works but is not ideal as there is no way to reflect say what mechJeb of SAS is doing

What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do?


What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?

pretty much any of the outbound messages e.g. flight status, fuel levels etc

Additional context


Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!

Change the way Setting.cfg is bundled

A default Setting.cfg is currently bundled with Simpit and as such, it will be overwritten by each mod update. We should rather bundle a Setting.cfg.sample and ask the user to copy it for the first install

[Feature]: Add an OutboundPacket for deltaV

Is your feature request related to a problem? Please describe.
I'd like to display the remaining deltaV of my rocket on my controler (both stage deltaV and total deltaV).

Describe the solution you'd like
I'd like a new outbout message (similar or even using a resourceMessage) to receive the deltaV from the game.

Describe alternatives you've considered
No alternative considered as the available fuel is not enough to compute deltaV.

[Feature]: Add messages for TAC Life Support ressources

TAC Life support is a popular that add some resources for life support. It would be great to have a message to get the amount of each of those resources.

After a discussion on Discord, the consensus seems to be for a single message with all those ressources. Example :

struct TACLSRessources {
  float maxWater;
  float currentWater;
  float maxFood;
  float currentFood;
  float maxOxygen;
  float currentOxygen;
  float maxWaste;
  float currentWaste;
  float maxLiquidWaste;
  float currentLiquidWaste;
  float maxCO2;
  float currentCO2;
};

[Feature]: Add inbound packets for CAG's and Ship Orientation

Is your feature request related to a problem? Please describe.

Whilst we have inbound packets for actions (brake, gear, lights etc) we do not have inbound packets for Custom Action Groups and for Ship Orientation (prograde, retrograde, normal, anti-normal etc).

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I use the outbound packets for actions to shift out a byte to a shift register and turn on the relevant LED's. This is ideal as they are not in the same series as my buttons (momentary toggle switches). This overcomes the problems that would have occurred if switches were used in the same series as a toggle switch (eg when reverting to a quicksave, it will unintentionally turn things on/off). Furthermore, its nice as you can have a controller and a keyboard that won't interfere with eachother.

Now, the same cannot be said for CAG's and ship orientation, as Simpit currently doesn't send this data from the game to the Serial. It would be great to have this!

Describe the solution you'd like

A clear and concise description of what you want to happen.

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

Similar to the actionstatus_message. I would like to be able to register to the channels, that being CAGSTATUS_MESSAGE and ORIENTATION_MESSAGE. From there, we could perform a series of if statements, each with a bitwise operation to determine the particular CAG, or the particular Orientation, that are currently turned on. Consider the following code as an example, inside the messageHandler

`byte CAGS = msg[0];

if (CAGS & CAG0) { 

 // processing

} 

else{

 // processing

  }

`

and similarly for the Orientation

`byte orientation = msg[0];

if (orientation & PROGRADE) { 

  // processing

} 

else{

  // processing

  }`

Describe alternatives you've considered

No alternative

What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do?

As stated, works for other things, not yet implemented for others

What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?

getting Action status data (brakes, gear etc)

[Feature]: Add outbound message with manoeuver data

Is your feature request related to a problem? Please describe.
I'd like to display on my controller data from the planned maneuver : time to maneuver, deltaV of the maneuver, length of the planned burn.

Describe the solution you'd like
I'd like an outbound message with all this data regarding the next maneuver :

  • time to maneuver
  • deltaV of the maneuver
  • length of the planned burn

Describe alternatives you've considered
No alternative found

[BUG]: A controller can register the same channel multiple times

Description of the bug

When a controller is connected to the game, there is nothing that will stop it from registering a subscription to a channel multiple times. This will then mean that it gets sent the same data multiple times.
Mentioned in here: https://github.com/Simpit-team/KerbalSimpitRevamped/releases/tag/v2.0.0

How repeatable is it? Eg "After I press stage 100 times, the mod will not take any more inputs from my controller"


If you reset a controller that is connected to the game multiple times, it will resubscribe to the same channels over and over.
  • Currently working on a fix for it.

[BUG]: Handshake loops for a while/forever

  • Mod version: v2-alpha6 + fix of 9/7/21 uploaded on Discord by Rogor
  • Game version: 1.12.2
  • Operating system: Windows 10
  • Microprocessor/s in use: Intel I5

First connection is working but generally after closing the connection on the KSP side, uploading new code to the Arduino or just resetting it and reopening the connection, the handshake loops on "KerbalSimpit: SYN received on port COM3. Replying."

Experimentations

I had two Arduinos configured, removed one from the config and now testing on a bare Arduino connected through a a USB hub.
It seems to work out when no channels are subscribed to but if there are multiple channels, it will start looping. Commenting out all channels won't make it better if the handshake hasn't recovered.

How repeatable is it?

it works on the first connection, usually start looping a few seconds after a few close/start and then it seems to get worse to the point of not even recovering after a while

To Reproduce

I can reproduce fairly easily with the following pattern:

  • connect successfully
  • close connection KSP
  • reset Arduino with or without modification
  • wait a few seconds
  • start connection in KSP

List of channels subscribed:

mySimpit.registerChannel(ALTITUDE_MESSAGE);
mySimpit.registerChannel(ACTIONSTATUS_MESSAGE);
mySimpit.registerChannel(LF_STAGE_MESSAGE);
mySimpit.registerChannel(OX_STAGE_MESSAGE);
mySimpit.registerChannel(XENON_GAS_STAGE_MESSAGE);
mySimpit.registerChannel(MONO_MESSAGE);
mySimpit.registerChannel(ELECTRIC_MESSAGE);
mySimpit.registerChannel(FLIGHT_STATUS_MESSAGE);
mySimpit.registerChannel(CAGSTATUS_MESSAGE);
mySimpit.registerChannel(APSIDES_MESSAGE);
mySimpit.registerChannel(VELOCITY_MESSAGE);
mySimpit.registerChannel(TACLS_RESOURCE_MESSAGE);
mySimpit.registerChannel(TACLS_WASTE_MESSAGE);
mySimpit.registerChannel(APSIDESTIME_MESSAGE);
mySimpit.registerChannel(ORBIT_INFO);
mySimpit.registerChannel(MANEUVER_MESSAGE);

actual code (removed all the commented code of my controller).

#include <Arduino.h>
#include <SoftwareSerial.h>
#include <KerbalSimpit.h>

#define DEBUG 1
#define TEST 0

const int pinDebugRx = 6;
const int pinDebugTx = 7;

SoftwareSerial Serial1(pinDebugRx, pinDebugTx); // RX, TX

KerbalSimpit mySimpit(Serial, Serial1);

void setup()
{
  Serial.begin(115200);
  Serial1.begin(38400);

  Serial1.println("debugging on");

  // simpit
  while (!mySimpit.init()) {
    delay(100);
  }
  mySimpit.printToKSP("Connected 3.10", PRINT_TO_SCREEN);
  
  mySimpit.inboundHandler(messageHandler);
  mySimpit.registerChannel(ALTITUDE_MESSAGE);
  mySimpit.registerChannel(ACTIONSTATUS_MESSAGE);
  mySimpit.registerChannel(LF_STAGE_MESSAGE);
  mySimpit.registerChannel(OX_STAGE_MESSAGE);
  mySimpit.registerChannel(XENON_GAS_STAGE_MESSAGE);
  mySimpit.registerChannel(MONO_MESSAGE);
  mySimpit.registerChannel(ELECTRIC_MESSAGE);
  mySimpit.registerChannel(FLIGHT_STATUS_MESSAGE);
  mySimpit.registerChannel(CAGSTATUS_MESSAGE);
  mySimpit.registerChannel(APSIDES_MESSAGE);
  mySimpit.registerChannel(VELOCITY_MESSAGE);
  mySimpit.registerChannel(TACLS_RESOURCE_MESSAGE);
  mySimpit.registerChannel(TACLS_WASTE_MESSAGE);
  mySimpit.registerChannel(APSIDESTIME_MESSAGE);
  mySimpit.registerChannel(ORBIT_INFO);
  mySimpit.registerChannel(MANEUVER_MESSAGE);
}

void loop() {
  mySimpit.update();
}

I modified KerbalSimpit.cpp to take another serial stream so I can send logs to another Arduino using pin 6 and 7 (connected respectively to 3 and 2 on the other Arduino running https://github.com/fgaudin/ArduinoDebugger)

bool KerbalSimpit::init()
{
  if (_serial == NULL) {
    return false;
  }
  _outboundBuffer[0] = 0x00;
  int i;
  for (i=0; i<sizeof(KERBALSIMPIT_VERSION); i++) {
    _outboundBuffer[i+1] = KERBALSIMPIT_VERSION[i];
  }
  i = i + 1;
  _receiveState = WaitingFirstByte;
  _serialDbg->println("sending SYN");
  _send(0x00, _outboundBuffer, i); // Send SYN

  uint8_t count = 0;
  
  _serialDbg->println("waiting for data");
  while (!_serial->available()){
    _serialDbg->println("not available");
    count += 1;
    delay(100);
    if(count > 10){
      return false;  
    }
  }
  int b;
  _serialDbg->println("Reading first byte");
  b = _serial->read();
  _serialDbg->println(b, HEX);
  if (b == 0xAA) { // First byte of header
    _serialDbg->println("First byte of header received");
    while (!_serial->available());
    _serialDbg->println("Reading second byte");
    b = _serial->read();
    _serialDbg->println(b, HEX);
    if (b == 0x50) { // Second byte of header
      _serialDbg->println("Second byte of header received");
      while (!_serial->available());
      _serialDbg->println("reading size");
      b = _serial->read(); // size
      _serialDbg->println(b, HEX);
      while (!_serial->available());
      _serialDbg->println("reading type");
      b = _serial->read();
      _serialDbg->println(b, HEX);
      if (b == 0x00) { // type
        _serialDbg->println("type == 0x00");
        while (!_serial->available());
        _serialDbg->println("payload ready");
        if (_serial->read() == 0x01) { // first byte of payload, we got a SYNACK
          _serialDbg->println("received SYNACK");
          // TODO: Do we care about tracking handshake state?
          _outboundBuffer[0] = 0x02;
          _send(0x00, _outboundBuffer, i); // Send ACK
          _serialDbg->println("sent ACK, success");
          return true;
        }
      }
    }
  }
  _serialDbg->println("sync failed");
  return false;
}

Here's one sample of the logs:
platformio-device-monitor-210908-213819.log

[Feature]: Stage Information

Is your feature request related to a problem? Please describe.

Can't currently display stage information using SimPit

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently SimPit offers no way of getting the stage number

What is the issue that you are facing, that you would like resolved? How would it benefit players?

Adding a stage information package would allow controllers to display this information, allowing for better immersion

Is it an existing/new feature in the game that would benefit from support by this mod?

Existing, staging indicator

Describe the solution you'd like

A clear and concise description of what you want to happen.

Implementation of a packet which contains current stage number and (if possible) total stage count

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

The mod needs to send a packet containing some numbers (bytes would probably be big enough for most cases, but the in game display goes up to three digits so short could be considered as well)

Describe alternatives you've considered

Looked through docs to see if this was already possible, couldn't find anything

A clear and concise description of any alternative solutions or features you've considered.

What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do?

There is to my knowledge no way to get current stage number and total stage count as of now

What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?

Probably flight status

Additional context

Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!

[Feature]:Make it possible/easier to get information from the game

Is your feature request related to a problem? Please describe.
I'm planning to show the action groups & CAG's state (on/off) from the arduino but i can't find how to the the state of the CAG. also action groups are not the only things to have this problem, but i'm focusing on CAGs.
What is the issue that you are facing, that you would like resolved?
Can't get the state of things like CAG on the arduino.
How would it benefit players?
Would make it WAY easier to use/manage CAGs with simpit.

Describe the solution you'd like
Add the CAGs in "ACTIONSTATUS_MESSAGE".
How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one?
pretty much just make CAG work like the action groups (example : lights, gears, brakes)
Would it need a terminal command to help use it, or a GUI button?
no
Describe alternatives you've considered
use switches instead of buttons (or make code to make a button work like a switch) to make sure it's either ON or OFF using the switch's state and set the action group to that value every loop to make sure it doesn't desync.
What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do? What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?
the previously stated "ACTIONSTATUS_MESSAGE" already does pretty much exactly what i want, it just can't get info from CAGs (or if there is i'm very sorry but i couldn't find a way anywhere)
Additional context
i planned to have most of the stuff in my controller sync info from the game without having to add too much code that could lead to desync of values, that include action groups, i would like to just set a custom character to the CAG's state (0/1).

[Feature]: Add GUI in KSP to show connection state and disconnect/reconnect

Is your feature request related to a problem? Please describe.
When developping the Arduino code, it is uploaded to Arduino via the serial link. So the code cannot be uploaded while the Arduino is connected to KSP. This usually mean that I have to restart KSP between each code update and this is tedious (especially with modded KSP).

Describe the solution you'd like
I'd like a GUI menu that shows if the Arduino is connected and the option to close the connection (to upload a new Arduino code or disable the controler if something strange happen) and to re-open the connection (to test the new code without having to reload a save).

Describe alternatives you've considered
The only option is currently to close the game, upload the code, and relaunch KSP. It is doable but tedious.

[Feature]: Add Flight Status message

Add a message with the following fields

  • bool isInFlight (true if in the Flight scene, will deprecate the SCENE_CHANGE_MESSAGE)
  • bool isEva
  • bool isRecoverable
  • byte vesselSituation (landed, splashed, flying, orbit, etc.)
  • byte currentTWIndex
  • byte crewCapacity
  • byte crewCount
  • float CommNetSignalStrengh

[BUG]: Simpit crash when using targets

Description of the bug

Simpit crash surrounding targets (Note this happens regardless of whether target channel is subscribed or not).

Mod version: 1.4.4.66

Game version:1.10.1

Operating system: Win 10

Microprocessor/s in use: Arduino Mega

A clear and concise description of what the bug is

What feature are you trying to use that is in the documentation, that is not behaving as the documentation says it should/will do?

When setting a target, and then going to the tracking station (without un setting the target, and then when you select another vessel to fly, it crashes the plugin.

I am displaying data to tft screen specifically, but it seems this is a universal bug rather than related to displays.

What have you done to ensure the issue is a bug? Have you tried checking different combinations of button presses for example, to ensure that it is indeed not your controllers code?


How repeatable is it? Eg "After I press stage 100 times, the mod will not take any more inputs from my controller"

Crashes every time with any vessels.

To Reproduce

  1. Please provide the code of your controller, to help with diagnosing the issue.

  2. Please thoroughly explain the most repeatable way that you have found to get the issue you are experiencing to occur.

  3. Please include any other details that you have that could be relevant to help with solving the problem.

  4. My code is 99% specific to the tft screen i am using. I beleive it will be unuseful, however i can send it if it will be needed.

  5. Commenting out most of the code in my arduino sketch, and testing as i described earlier.

  6. Nothing to add (i PM'd you most of the details earlier as you know).

Expected behaviour

Not to crash

A clear and concise description of what you expected to happen.

The Game seems to keep a reference of which vessel is targeting another object, ragardless of whether it is currently being flown by the user. Currently after looking at the simpit source code, it seems the plugin assumes a vessel is also tageting the same object as the previous vessel, and therefore it crashes.

What is it in the documentation that leads you to believe the behaviour you are experiencing is unintended. Eg: Is something meant to be returning a specific value, and is never doing that?

Nothing in the documentation, just my (hopefully correct) understanding of how the game works and the mod

Additional context

  • Please attach your code for the controller you are using/trying to build.
  • Any log files you may have

Here is the log when it crashes.

KerbalSimpit.Providers.KerbalSimpitTargetProvider.TargetProvider () [0x00028] in :0
at KerbalSimpit.KSPit+<>c__DisplayClass14_0.b__0 () [0x00061] in :0
at KerbalSimpit.KSPit.EventWorker () [0x0003b] in :0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in :0
at System.Threading.ThreadHelper.ThreadStart () [0x00008] in :0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.UnhandledExceptionHandler:m__0(Object, UnhandledExceptionEventArgs)

[Feature]: dedicated quicksaving integration

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]


I need to take my hands off of my (fictional) controller to load a quicksave/make one during a difficult time.

What is the issue that you are facing, that you would like resolved? How would it benefit players?


To add in a custom packet to handle creating quicksaves, loading the last quicksave, and bringing up the quicksave menu.

Is it an existing/new feature in the game that would benefit from support by this mod?


The standard game saving 🤷‍♂️

[Feature]: Add orbital information message

I think it would be a good thing to have more information on the orbit than what we currently have (only apoapsis/periapsis altitude). It could be useful for instance to know from the controller if a mission requesting a specific orbit is reached for instance

The orbit can be described with those 5 parameters :

  • Eccentricity
  • Semi major axis
  • inclination
  • longitude of ascending node
  • argument of periapsis

The eccentricity and the semi-major axis can be recomputed from the apoapsis or the periapsis (or the other way around).

To define the position of the craft on the orbit, on can use the true anomaly (or the mean anomaly).

More information on orbital parameters here

We can also add the period of the orbit as a useful information.

All those information can be found within this class in the API.

If we want to send all those information, we need a message with 8 floats (5 for the orbit plus mean anomaly, true anomaly and the period).

@LRTNZ Do you think a new message with those 8 parameters would be a good addition ?

[Feature]: Rewrite serial protocol: COBS encoding, smaller packets.

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

A clear and concise description of what you want to happen.

The last feature that I started working on before dropping this project entirely was a total rewrite of the serial protocol. The intention was to make packets smaller, with lightweight error detection.

Right now, a data packet is serialised as-is, with a four byte header. A typical packet looks like this:

leader byte 1 | leader byte 2 | msgSize   | msgType | payload
 0xAA         |  0x50         |  0-32     |  0-255  | Any valid data
 Alternating  | High is 0101  | higher is |         |
 0 and 1 bits | Low is version| an error  |         |

I'd like to suggest, instead of pushing data across the line as-is, the plugin switches to encoding data with COBS. COBS provides unambiguous framing, and can be done in a stream in the arduino library with trivial overhead. Using COBS encoding, I'd propose a packet that looks like:

msgType | payload        | checksum
 1 byte | Any valid data | 1 byte XOR of entire packet

COBS encoding adds at most a single byte to a packet. But it saves having to transmit those leader bytes of useless data with every packet. And replacing the msgSize in the header with an XOR checksum in the last byte of the packet helps streamline packet serialisation for tiny 8 bit uCs.

Along with a new protocol, I'd like to suggest these changes to the handshaking:

  • SYN packet includes a payload that specifies the protocol version (replacing the low half of leader byte 2), and the arduino library version. Including the library version lets the plugin log a warning if there's a mismatch between game plugin and arduino library.
  • SYN/ACK has no payload.
  • ACK packet from the Arduino library can include an optional payload, which the plugin logs. I've always intended multi-controller setups to be first-class citizens with simpit. If the end user can include a custom message in the ACK from each of their controllers, then that would aid debugging if one of them isn't connecting.

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

Changing the encoding without hurting users of older Arduino libraries too much would probably involve some code in the plugin that can detect version 1 headers, and appropriate error logging.

[BUG]: Time warp to specific time (maneuver, SOI, Ap/Pe) sometimes does not speed up

Description of the bug

Mod version: Simpit V2.2.0
Game version: 1.12.4 / 1.12.5
Operating system: Windows 10
Microprocessor/s in use: Arduino Pro Micro Clone

A clear and concise description of what the bug is

What feature are you trying to use that is in the documentation, that is not behaving as the documentation says it should/will do?

When I press my button to try and warp to the next maneuver it displays the "TimeWarping... T- xxminutes. Press [Minus] to cancel" message in game (with xx beeing the correct number), but at the same time it sets the actual timewarp to x1 (normal time, without timewarp).

What have you done to ensure the issue is a bug?

The mod/game obviously recognizes that I want to timewarp to a specific time, but the warp rate is wrong.

How repeatable is it?

Sometimes it does behave how it should and speeds up the time. I have not found a pattern yet how to reliably reproduce the issue. It might have to do with how far the point in time to warp to is in the future. Short distances (like about 5 minutes) seem to make more problems than medium distances (like about 20 minutes).

To Reproduce

Use the following code on an arduino and connect a button to pin 2. Start KSP and go to a ship e.g. in orbit. Generate a maneuver 3 minutes in the future and try warping to it by pressing the button connected to pin 2.

#include "KerbalSimpit.h"
#define PIN_SWITCH 2
KerbalSimpit mySimpit(Serial);
bool oldSwitchState = HIGH;

void setup() 
{
	Serial.begin(115200);
	pinMode(PIN_SWITCH, INPUT_PULLUP);

	while (!mySimpit.init()) delay(100);
}

void loop() 
{
	if(digitalRead(PIN_SWITCH) == LOW) 
	{
		if(oldSwitchState == HIGH) 
		{
			Timewarp myWarpLevel;
			myWarpLevel = TIMEWARP_NEXT_MANEUVER;
			mySimpit.send(TIMEWARP_MESSAGE, myWarpLevel);
		}
		oldSwitchState = LOW;
	}
	else oldSwitchState = HIGH;
	delay(100); //Debounce switch
}

Expected behaviour

The time warp rate should be set to something reasonable to warp to the desired point in time, when telling simpit to warp to a specific point in time (maneuver, SOI, Ap/Pe)

[Feature]: Add vessel temperature information

Is your feature request related to a problem? Please describe.


Add vessel temperature information

What is the issue that you are facing, that you would like resolved? How would it benefit players?


Users could use this information to display overheating alarm and / or temp information.

Describe the solution you'd like


Expose temperature information like another resource. Seeing each part has a Core and Skin temp, this will probably have to be presented as an overall percentage of the max temp before overheating if that makes sense

[Feature]: Add additional information on horizontal/vertical velocity

Is your feature request related to a problem? Please describe.
To help with landing, I'd like to be able to display vertical and horizontal velocity with respect to the terrain. Currently, only the value of the velocity is available and not its decomposition in horizontal/vertical components.

Describe the solution you'd like
A new outbound message (to avoid breaking the retro-compatibility) with the horizontal/vertical components of the velocity with respect to the terrain.

Describe alternatives you've considered
No alternative found.

[BUG]:

Hello there seems to be an issue with the new version of simpit 2.2.0. I am unable to complete the handshake with the new version. It is stuck at "WAITING_HANDSHAKE". It is however working just fine with version 2.1.0.

Really appreciate the work put into this. The new gForces value comes in real handy :) (if the new version would work haha)

Thank you!

[Feature]: ACTIONSTATUS_MESSAGE (or similar) during EVA for SAS/RCS/Light

Problem

The ACTIONSTATUS_MESSAGE does not update LIGHT_ACTION, SAS_ACTION and RCS_ACTION during an EVA, so indicator LEDs on the controller don't work.

Possible solution

Send ACTIONSTATUS_MESSAGE also during EVA. Or create a new message for EVA stuff.

Alternatives and workarounds

Just deactivate all LEDs in question when entering EVA and put up with the fact that they don't show the actual status.

[Feature]:TimeKeeper Integration

Is your feature request related to a problem? Please describe.


There isn't a way to get the number of sols/orbits that the current vessel achieved (example : 42 orbits since the vessel was launched ### A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
i need a way to get the number of Sols/Orbits of the active vessel (basicly just get the value from https://forum.kerbalspaceprogram.com/index.php?/topic/178121-18-timekeeper-102-2019-10-17-orbits-and-sols-counter/&tab=comments#comment-3446917) ### What is the issue that you are facing, that you would like resolved? How would it benefit players?
adding integration for Timekeeper would allow players to easily get the number of days that went by since landing, or the number of orbits a satellite has done since it was placed in orbit.

Is it an existing/new feature in the game that would benefit from support by this mod?


not that i know of

Describe the solution you'd like

add a way of getting the sol/orbit's value from the mod as a float or something (idk about the format, float is just a example) and a boolean to know whenether the float value are Sols or Orbits

A clear and concise description of what you want to happen.


get the current sol/orbit (sol vs orbit determined by boolean ?) value of the current vessel and the state

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?


just get the sol/orbit value from the TimeKeeper mod as you do with variables like altitude for example ###

Describe alternatives you've considered


the only alternative is not adding a day/orbit counter, and it's not that big of a deal, but it would be neat to have ### A clear and concise description of any alternative solutions or features you've considered.
none ### What about the current features of the program do not quite, if at all, allow you to implement/carry out what you would like to do?
there aren't any ### What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting? ...

Additional context


the timekeeper mod (https://forum.kerbalspaceprogram.com/index.php?/topic/178121-18-timekeeper-102-2019-10-17-orbits-and-sols-counter/&tab=comments#comment-3446917) ### Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!

[Feature]: get a readback from the throttle position from KSP

Is your feature request related to a problem? Please describe.

I would like to have the possibility to get a readback the throttle from KSP (similar to for example getting the current altitude). The reason is that I have a motorized slider, for throttle control and I would like it to follow throttle changes if I use Mechjeb2 for controlling the spacecraft.

What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?

A solution similar to the readback from the current altitude (or any other parameter for that matter).

Additional context

As discussed on Discord, this feature is indeed not already present in the plugin:
rogor

31/01/2022
This is not a feature of SimPit currently
But we can investigate it, in theory it should not be that hard to add
Can you create a feature request on GitHub so that this request is not forgotten ?

I understand that this can create a feedbackloop if I do not properly seperate manual throttle movement from motorized movement because of received data from KSP. Features to help prevent this are actually already implemented in these motorized sliders in that they can detect whether they are touched or not.

[Feature]: Add message to control custom axis

Add a message with to control custom axis

There is 4 custom axis, that could be controlled just like throttle or rotation.

An API seems to exist to update the in FlightCtrlState class.

To be discussed if we do one or 4 messages (with bitmask) to control them.

Feature requested by Catelyn on Discord

[Feature]: Add support for kOS

Description of the proposal

kOS is a scripting mod for KSP that allow user to automate a lot of stuff. A way to link kOS with SimPit (meaning for kOS to send data to an Arduino through SimPit or to allow an Arduino to call kOS script through SimPit) would greatly increase the capabilities of controllers without needing additional development on the SimPit mode

Workaround

One way to do this SimPit <-> kOS communication would be through unused CAG. For instance with AGExt installed, SimPit can set an unused CAG (for instance with an ID > 100) and kOS can monitor it. Or the other way around : kOS set a CAG to a specific state and SimPit already send the CAG status to Arduino (pending the fix of #14).

Potential steps

kOS support Addon to support the integration of other mods. We could develop a new add for Simpit support.

It would require :

  • Reserve some message ID for messages in both direction
  • Adding some public facing method to send messages to the Arduino
  • Add in a kOS addon a new command to call this public facing function
  • Add a message from Arduino to call a specific kOS script. The scripts to call could be defined in the setting file.

[BUG]: Keyboard Emulation does not allow for EVA UP (Left Shift)

Keyboard Emulation presses Right Shift, but Left Shift is needed for EVA UP using the jet pack. No other function in Simpit allows for EVA Up.

Mod version: Latest Pre-Release
Game version: 1.11
Operating system: Win10
Microprocessor/s in use: Arduino Nano, Intel 8700K

This is similar to the bug regarding sending Shift as a key modifier, but in this case it does not send as a normal keypress, either. This bug could be remedied by remapping keys in KSP (however, the other bug cannot), but finding a solution to one of these bugs is likely to also fix the other.

[Feature]: Warp to next manouver message from simpit to ksp

Describe the solution you'd like

A clear and concise description of what you want to happen.

Similar to other messages that are sent from simpit to KSP, you can send one to warp to next manovre if one exists


How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

An accompanied arduino function call, unless it is easier just to use the send function

[Feature]: Add a "Vessel changed" message

The problem

When changing vessels in the game the controller might be in an inconsistent state to the vessel you changed to. E.g. if using an unmotorized potentiometer as a throttle, the potentiometer might be set to a different value than the ships throttle, maybe resulting in unwanted thrust. If you got a notification every time the ship changes you could discard all inputs in question until you've insured consistency between you controller and the current vessel in game. Maybe even flash an LED to notify the player about the inconsitencies.

Feature request to solve the problem

Send a VESSEL_CHANGED_MESSAGE message every time the game switches to a different vessel.

Nearest features that are already in the mod

You can use the SCENE_CHANGE_MESSAGE to get a notice when entering the flight mode.
You can use the VESSEL_NAME_MESSAGE to get most of the vessel changes. But this only workes when the two vessels have different names.
You can track single values (like the throttle) and note when they change without the player changing the input (e.g. player has not moved throttle in the last second)

[BUG]: EVA Propellant message is not being sent (EVA_MESSAGE)

Description of the bug

EVA propellant message doesn't appear to be sent. Other fuel messages get sent and displayed properly, but EVA doesn't appear to work. I believe this has to do with Alternate Resource Panel not displaying EVA prop while on EVA.

Using SF_MESSAGE properly displays solid fuel on the ship, but EVA_MESSAGE retrieves nothing.

While on EVA, EVA prop is shown in the regular resources panel, but not ARP, and it doesn't appear to be retrievable by Simpit. Retrieved value appears to be either 0 or null.

Mod version: alpha 6

Game version: 1.11

Operating system: Win 10

Microprocessor/s in use: arduino nano

[Feature]: Camera pan and camera tools

Is it an existing/new feature in the game that would benefit from support by this mod?

It is in the game. The feature i am requesting is similar to holding down right click on the mouse and moving the mouse to pan the camera. By searching camera_position in the api, and seeing this "Vector3d FlightGlobals.camera_position", this seems promising. An additional feature could be to add in controls for camera type (lock, chase , auto) , but personally i have only ever used auto

Describe the solution you'd like

Similar to controlling rotation of vessel, control panning of the camera.

A clear and concise description of what you want to happen.

I will use the joysticks as an example. (Feel free to ask which ones but we have discussed them in discord). Push the joystick forward/back to rotate over/under the joystick. Push the joystick left/right to rotate around the craft. Twist the joystick to zoom in / out. And you should be able to send all 3 things as part of the same message (similar to rotation messages) for real 3d ness and so you can go diagonal etc.

How would it be best that the feature is implemented? What sort of data may need to be sent by the mod to controllers? Would it require a digital signal, or an analogue one? Maybe it needs a terminal command to help use it, or a GUI button?

As above and most definitely analogue.

What is the nearest feature in the mod (If there is one), that is along the lines of what you are suggesting?

Rotation / translation although this is old

Add any other context or screenshots about the feature request here. Any drawings, screenshots, pseudocode/logic diagrams, and more are all appreciated. Anything that you feel may help others understand your idea would be great!

[BUG]: Sending command to KSP fails

Mod version: 2.1.2

Game version: 1.12.3.3173 (WindowsPlayer x64) en-us

Operating system: Windows 10 19043.1706

Microprocessor/s in use: Arduino UNO

Hi, I tried following the Second example : sending information to KSP example from the documentation website but I'm getting an error everytime I hit the button wired to my Arduino UNO controller.

Everything seems to be working well, I have the plugin installed, and it says the status is CONNECTED. I also was able to run the First example : receiving information from KSP with no issue. But as soon as I use the code from the staging example, and hit the button to stage, I get the following error in the KSP.log file:

[LOG 11:09:42.337] KerbalSimpit: IOException in serial worker for COM3: System.IO.IOException: Le périphérique ne reconnaît pas la commande.

  at System.IO.Ports.WinSerialStream.ReportIOError (System.String optional_arg) [0x00039] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.IO.Ports.WinSerialStream.get_BytesToRead () [0x00011] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.IO.Ports.SerialPort.get_BytesToRead () [0x00006] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort.get_BytesToRead()
  at KerbalSimpit.Serial.KSPSerialPort.<SerialPollingWorker>b__40_0 () [0x00000] in <fa7c47051a6f46d2bc94205940242fad>:0 

Any help with this would be greatly appreciated! Thanks

To Future Self: Fix the hardcoded channel values

With the current system, the event channel firing things relies on hardcoded string values in the mod - which is really not a nice way to do things. To improve things, the best approach will be to either redo that part of the system entirely, to make use of enums or something, or alternatively generate those string values with the values in the enum at run/compile time.

[BUG]: Certain channels freeze up when docking or undocking

Certain channels freeze up when docking or undocking

Mod version: Alpha pre release

Game version: 1.11.2

Operating system: OSX

Microprocessor/s in use: Arduino Mega

When docking or undocking (mainly undocking) certain channels such as apsides, velocity, burn time, SOI, etc freeze and won't update. SAS, RCS and Action Groups still work for example.

What feature are you trying to use that is in the documentation, that is not behaving as the documentation says it should/will do?


What have you done to ensure the issue is a bug? Have you tried checking different combinations of button presses for example, to ensure that it is indeed not your controllers code?

I have contacted rogor via discord and supplied the KSP log.

Doesn't happen every time but does pretty often.


To Reproduce

Dock with another ship with the apsides or velocity displaying. Undock and switch to original ship. The display should no longer update if duplicated.

Expected behaviour

I would expect the data to update after undocking.


What is it in the documentation that leads you to believe the behaviour you are experiencing is unintended. Eg: Is something meant to be returning a specific value, and is never doing that?


Additional context

KSP.log.zip

[Feature]: Improve control on "Timewarp to" command

Current Timewarp message allow the user to warp to a specific point in time (apoapsis, periapsis, next maneuver, SOI change or next morning). For the first 3 options, the user may want to perform a burn so the need is not to warp to this point in time but a little before it.

First option is to warp to a given delta of the timepoint (for instance 30 sec before). This value could be hardcoded or set in the config file.

For the warp to maneuver, we could use the estimated burntime to warp to 30sec + half of the estimated burnime for instance (to account for 30 sec to rotate and then perform half the burn before the maneuver and half of it after). The estimated burntime is currently estimated with a cross multiplication of the delta-v of the maneuver with the current stage delta-v and burntime. It could be used as is or the computation could be improved to take into account a maneuver that need several stages.

To account for those different solutions, addition values for WarpControlValues can be added :

  • WARP_BEFORE_APOAPSIS (30 sec before)
  • WARP_BEFORE_PERIAPSIS (30 sec before)
  • WARP_BEFORE_MANEUVER (30 sec before)
  • WARP_BEFORE_MANEUVER_BURNTIME (use burntime estimation to warp 30 sec + half of burntime before)

[BUG]: KSP get's RadialIn and RadialOut SAS modes mixed up

Kerbal Space Program uses the radial in and radial out values the wrong way round. It seems to be a KSP bug, not a Simpit bug, as prints in the console clearly state Simpit setting the mode the other way round.

Fix: Switch RadialIn and RadialOut in AxisControl.cs here, here and here

Workaround: Switch RIN and ROUT in the controller's code.

[Feature]: Add message to set the trim values

The Flight ControlState API allow setting the values for the trim and there is currently no way to set them from the SimpitAPI.

One solution would be to reuse the Rotation message and use the unused bits from the bitmask to indicate that the values in the message should be the new trim value.

[BUG]: Serial stop/start does not restore all functionalities

Description of the bug

Mod version: current develop branch

Game version: 1.10

Operating system: Windows

A clear and concise description of what the bug is

When using '/sim serial stop' and then '/sim serial stop', the function initPorts is called. This function redefine all the elements of onSerialReceivedArray. This mean that all the callback that are defined are erased. This break the SimPit functions that listen for input from Arduino. We need to reload the game to restore those functionalities.

To Reproduce

  1. Launch KSP and load a mission
  2. Type '/sim serial stop'
  3. Type '/sim serial start'
  4. Restart the Arduino
  5. Try to use functions to send data to KSP : it is not registered. Reloading the game solve the issue.

To Solve

When stopping and restarting serial connection, the connection itself should be reset but all the callbacks should not be erased.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.