Skip to content

Commit

Permalink
Added screen for parts temperatures, and new look of consumables-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunefix committed Mar 24, 2018
1 parent 22d3d61 commit 95da459
Show file tree
Hide file tree
Showing 7 changed files with 370 additions and 118 deletions.
28 changes: 16 additions & 12 deletions KSP_MOCR/Classes/MocrScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,52 +59,56 @@ public static MocrScreen Create(int id, Screen form)
{
case 0:
scr = new ConnectionScreen(form);
name = "";
name = "HELP";
break;
case 1:
scr = new AscentScreen(form);
name = "";
name = "OVERVIEW";
break;
case 2:
scr = new BoosterScreen(form);
name = "";
name = "BOOSTER";
break;
case 3:
scr = new ResourcesScreen(form);
name = "";
name = "CONSUMABLES";
break;
case 4:
scr = new OrbitView(form);
name = "SPACECRAFT ORBIT (INCLINATION NOT INCLUDED)";
break;
case 5:
scr = new SingleOrbit(form);
name = "";
name = "ORBITAL DATA";
break;
case 6:
scr = new Electrical(form);
name = "ELECTRICAL SYSTEMS";
break;
case 7:
scr = new Temperature(form);
name = "TEMPERATURE / ABLATORS / RADIATORS";
break;
case 8:
scr = new MapScreen(form);
name = "";
name = "MAP";
break;
case 9:
Console.WriteLine("MAKING TEST");
scr = new TestScreen(form);
name = "";
name = "TEST";
break;
case 11:
scr = new StreamsScreen(form);
name = "";
name = "CURRENT STREAMS FROM KRPC";
break;
case 12:
scr = new DataStorageScreen(form);
name = "";
name = "CURRENT DATA IN DATA-STORAGE (PySSSMQ)";
break;
case 40:
scr = new FDO(form);
name = "";
name = "FIDO";
break;
case 50:
scr = new Terrain(form);
Expand Down Expand Up @@ -170,10 +174,10 @@ public static MocrScreen Create(int id, Screen form)
scr = new CrtTest2(form, 5);
name = "CRT TEST SCREEN #2";
break;
case 100:
/*case 100:
scr = new Pilot1(form);
name = "";
break;
break;*/
case 101:
scr = new FDAIScreen(form);
name = "FDAI";
Expand Down
2 changes: 1 addition & 1 deletion KSP_MOCR/Classes/helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ static public String toFixed(double? d, int p, bool showPlus)
else
{
double d2 = d.Value;
String b = Math.Round(d2).ToString(format);
String b = Math.Floor(d2).ToString(format);
r = Math.Round(d2, p).ToString(format);

// Check that d isn't whole number, if so; add '.'
Expand Down
3 changes: 0 additions & 3 deletions KSP_MOCR/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
using System.IO;
using System.Net;
using System.Threading;
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;
using System.Diagnostics;
using Microsoft.Win32;

Expand All @@ -32,7 +30,6 @@ public partial class Form1 : Form

public PySSSMQ_client pySSSMQ = new PySSSMQ_client();
public PySSSMQ_Handler pySSSMQ_handler;
public ScriptSource pySSSMQ_server;

public DataStorage dataStorage;

Expand Down
1 change: 1 addition & 0 deletions KSP_MOCR/KSP_MOCR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<Compile Include="Screens\Pilot1.cs" />
<Compile Include="Screens\StreamsScreen.cs" />
<Compile Include="Screens\TApoVel.cs" />
<Compile Include="Screens\Temperature.cs" />
<Compile Include="Screens\Terrain.cs" />
<Compile Include="Screens\Test.cs" />
<EmbeddedResource Include="Form1.resx">
Expand Down
15 changes: 9 additions & 6 deletions KSP_MOCR/Screens/ConnectionScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ConnectionScreen(Screen form)
this.screenStreams = form.streamCollection;

this.width = 60;
this.height = 30;
this.height = 35;
}

public override void updateLocalElements(object sender, EventArgs e)
Expand Down Expand Up @@ -59,7 +59,7 @@ public override void makeElements()
for (int i = 0; i < 1; i++) screenInputs.Add(null); // Initialize Inputs
screenInputs[0] = Helper.CreateInput(-2, -2, 1, 2); // Every page must have an input to capture keypresses on Unix

screenLabels[4] = Helper.CreateLabel(0, 0, 60, 30); // Help text
screenLabels[4] = Helper.CreateLabel(0, 0, 60, 35); // Help text
screenLabels[4].Text = "╥─── HELP ───\n"
+ "║\n"
+ "║ To switch between the different screens,\n"
Expand All @@ -69,12 +69,12 @@ public override void makeElements()
+ "║ 0 - HELP\n"
+ "║ 1 - ASCENT\n"
+ "║ 2 - BOOSTER\n"
+ "║ 3 - RESOURCES\n"
+ "║ 3 - CONSUMABLES\n"
+ "║ 4 - ORBIT VIEW\n"
+ "║ 5 - ORBIT DATA\n"
+ "║ 6 - ELECTRICAL SYSTEMS\n"
+ "║ 7 - TEMPERATURE / ABLATORS / RADIATORS\n"
+ "║ 8 - MAP VIEW\n"
+ "║ 9 - FONT/ALIGNMENT TEST\n"
+ "║ 12 - DATA STORAGE (PySSSMQ)\n"
+ "║ 50 - TERRAIN GRAPH\n"
+ "║ 51 - ALTITUDE / INERTIAL VELOCITY - GRAPH\n"
Expand All @@ -83,12 +83,15 @@ public override void makeElements()
+ "║ 54 - ALTITUDE / RANGE - GRAPH\n"
+ "║ 55 - ALTITUDE / VERTICAL SPEED (H / HDOT) - GRAPH\n"
+ "║ 56 - FLIGHT PATH ANGLE / INERTIAL VELOCITY - GRAPH\n"
+ "║ 100 - PILOT\n"
+ "║ 101 - FDAI\n"
+ "║ 102 - DSKY\n"
+ "║\n"
+ "║ 201-215 - STATUS REPORT (Requires PySSSMQ connection)\n"
+ "║ 220 - STATUS PANEL (Requires PySSSMQ connection)\n"
+ "║\n"
+ "║\n";
+ "║\n"
+ "║ 9 - FONT/ALIGNMENT TEST\n"
+ "║ 99 - CRT FONT/ALIGNMENT TEST\n";

screenLabels[5] = Helper.CreateLabel(0, 0, 60, 2, "──────────────────── CONNECTION DETAILS ────────────────────"); // Connection Header}

Expand Down
Loading

0 comments on commit 95da459

Please sign in to comment.