Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetopia committed Jan 13, 2024
1 parent a90d08b commit 0b0e54d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# Simpit
Provides a serial connection interface for custom controllers.
This is a Kerbal Space Program 2 plugin to provide a serial connection interface for custom controllers.

This is the KSP2 version of [Kerbal Simpit Revamped](https://github.com/Simpit-team/KerbalSimpitRevamped)

It works with an accompanying [Arduino library](https://github.com/Simpit-team/KerbalSimpitRevamped-Arduino) to make building hardware devices simpler.
It works with the accompanying [Arduino library](https://github.com/Simpit-team/KerbalSimpitRevamped-Arduino) to make building hardware devices simpler.

We have a Discord Server! [Invite Link](https://discord.gg/ZwcPdNcaRN). We have an [online documentation](https://kerbalsimpitrevamped-arduino.readthedocs.io/) for using this mod.

## How to install
This mod comes in two parts: the KSP mod and the Arduino lib.
To install the KSP mod, you can either:
- Install it through [CKAN](https://github.com/KSP-CKAN/CKAN) by installing Simpit (easier)
- Download it from github and install it manually (harder)
- Download and install the dependencies (SpaceWarp, UITK for KSP2, BepInEx).
- Go the release tab and dowload the latest version of this mod.
- Copy the Simpit folder next to its dependencies into the BepInEx/plugins/ folder of your KSP2 install.

After that start KSP2 and go to the MODS section in the main menu to change the Serial port to the port of your Arduino in the Simpit settings. You can find the right port name by copying the port name you are using in the Arduino IDE.

The Serial connection does not yet start automatically, you have to open it manually. When in flight mode, you can find the Simpit-UI in the App bar under the 9 dots.

To install the Arduino lib, you can download it [here](https://github.com/Simpit-team/KerbalSimpitRevamped-Arduino) and install it in your Arduino IDE by going to Sketch -> Include library -> Add .ZIP library. Then you should find some Simpit examples in the example list.

Simpit for KSP2 is built very similar to Simpit-revamped for KSP1. If you already have a controller for KSP1, most of your controller should work with KSP2 without any changes. For differences look at the [online documentation](https://kerbalsimpitrevamped-arduino.readthedocs.io/) .

## Setup for building
- You must have the dotnet-sdk-7 installed.
Expand Down
5 changes: 5 additions & 0 deletions plugin_template/assets/lib/licences.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
System.ComponentModel.Primitives.dll
https://dotnet.microsoft.com/en-us/dotnet_library_license.htm

System.IO.Ports.dll
https://licenses.nuget.org/MIT
8 changes: 4 additions & 4 deletions plugin_template/swinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"spec": "2.0",
"mod_id": "Simpit",
"author": "Tetopia",
"name": "Simpit",
"name": "Simpit (Beta version)",
"description": "Provides a serial connection interface for custom controllers.",
"source": "",
"version": "0.0.8",
"source": "https://github.com/Simpit-team/KerbalSimpit-KSP2",
"version": "0.1.0",
"version_check": "https://raw.githubusercontent.com/Simpit-team/KerbalSimpit-KSP2/main/plugin_template/swinfo.json",
"ksp2_version": {
"min": "0.2.0",
"max": "0.2.0"
"max": "*"
},
"dependencies": [
{
Expand Down
Binary file added release/Simpit_v0.1.0.zip
Binary file not shown.
8 changes: 5 additions & 3 deletions src/Simpit/SimpitPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@

//TODO Why are the EventData now called EventDataObsolete? Possible solution: Replace EventDataObsolete and GameEvents.XYZ with Messages and MessageCenter

//TODO AxisControl.cs : Test the outbound messages. The CommandProviders probably have to be added somewhere
//TODO AxisControl.cs : Test the outbound messages. The CommandProviders probably have to be added somewhere?
//TODO Is VesselChangedMessage the correct message to fire controlledVesselChangeEvent.Fire(OutboundPackets.VesselChange, VesselChangeValues.switching) ? In KSP 1 it fired on GameEvents.onVesselSwitching but there is no VesselSwitchedMessage in KSP2
//TODO FlightProvider.cs: For FlightStatusBits.isInFlight was HighLogic.LoadedSceneIsFlight used which is deprecated. Test if simVessel.IsVesselInFlight() also works
//TODO FlightProvider.cs: Does the crew count work correctly?
//TODO Check if the onFlightReady and the onGameSceneSwitchRequested events are fired correctly.
//TODO Telemetry.cs : Please check/test especially airspeed, maneuverData, rotationData
//TODO WarpControl.cs : Please check/test especially setting a specific warp level, timewarp to Ap/Pe/SOI change/Next morining
//TODO Resources.cs : Test Ablator per Stage. It might not work because the per stage calculation only looks at fuel
//TODO TargetInfo.cs: Test the TargetProvider
//TODO Does the scene change notification stuff work?
//TODO FlightProvider.cs: Get a better CommNet signal strength. Is there something like that in KSP2? Can it be calculated by antennas and distance?

//TODO Arduino lib: add a flag for KSP version which is sent in Handshake
//TODO WarpControl.cs : Timewarp to PE goes past the Pe if Pe is in another SOI (e.g. going to the mun)
//TODO WarpControl.cs : warp levels are different between KSP2 and KSP1 how to handle that?
//TODO WarpControl.cs : timewarp to Next morining doesn't work

//TODO Arduino lib - Resources.cs : Implement other resources: OutboundPackets 52 to 62
//TODO Add RadiatorPanels Action group. This is the ninth Action group so all the action group messages need a second byte of payload
//TODO For the Action groups there is now the state "mixed", e.g. if only some lights are on, others are off. Should the mixed state be counted as on or off? Or is there a possibility to also send the mixed state?
Expand Down

0 comments on commit 0b0e54d

Please sign in to comment.