Skip to content
Snippets Groups Projects
Commit 86de794b authored by Dennis Eisold's avatar Dennis Eisold
Browse files

Merge branch 'master' into 'master'

Fixed temp min/max fields and calc

See merge request !42
parents 3680ea35 0117aadc
No related branches found
No related tags found
1 merge request!42Fixed temp min/max fields and calc
...@@ -201,7 +201,7 @@ namespace Wetterstation ...@@ -201,7 +201,7 @@ namespace Wetterstation
this.lbInnenTemp.Name = "lbInnenTemp"; this.lbInnenTemp.Name = "lbInnenTemp";
this.lbInnenTemp.Size = new System.Drawing.Size(252, 70); this.lbInnenTemp.Size = new System.Drawing.Size(252, 70);
this.lbInnenTemp.TabIndex = 13; this.lbInnenTemp.TabIndex = 13;
this.lbInnenTemp.Text = "NA °C"; this.lbInnenTemp.Text = "---";
this.lbInnenTemp.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbInnenTemp.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbAussenTemp // lbAussenTemp
...@@ -215,7 +215,7 @@ namespace Wetterstation ...@@ -215,7 +215,7 @@ namespace Wetterstation
this.lbAussenTemp.Name = "lbAussenTemp"; this.lbAussenTemp.Name = "lbAussenTemp";
this.lbAussenTemp.Size = new System.Drawing.Size(255, 70); this.lbAussenTemp.Size = new System.Drawing.Size(255, 70);
this.lbAussenTemp.TabIndex = 15; this.lbAussenTemp.TabIndex = 15;
this.lbAussenTemp.Text = "NA °C"; this.lbAussenTemp.Text = "---";
this.lbAussenTemp.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbAussenTemp.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbWindSpeed // lbWindSpeed
...@@ -228,7 +228,7 @@ namespace Wetterstation ...@@ -228,7 +228,7 @@ namespace Wetterstation
this.lbWindSpeed.Name = "lbWindSpeed"; this.lbWindSpeed.Name = "lbWindSpeed";
this.lbWindSpeed.Size = new System.Drawing.Size(280, 70); this.lbWindSpeed.Size = new System.Drawing.Size(280, 70);
this.lbWindSpeed.TabIndex = 16; this.lbWindSpeed.TabIndex = 16;
this.lbWindSpeed.Text = "NA ms"; this.lbWindSpeed.Text = "---";
this.lbWindSpeed.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbWindSpeed.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbLuftFeuchtInnen // lbLuftFeuchtInnen
...@@ -241,7 +241,7 @@ namespace Wetterstation ...@@ -241,7 +241,7 @@ namespace Wetterstation
this.lbLuftFeuchtInnen.Name = "lbLuftFeuchtInnen"; this.lbLuftFeuchtInnen.Name = "lbLuftFeuchtInnen";
this.lbLuftFeuchtInnen.Size = new System.Drawing.Size(222, 70); this.lbLuftFeuchtInnen.Size = new System.Drawing.Size(222, 70);
this.lbLuftFeuchtInnen.TabIndex = 17; this.lbLuftFeuchtInnen.TabIndex = 17;
this.lbLuftFeuchtInnen.Text = "NA %"; this.lbLuftFeuchtInnen.Text = "---";
this.lbLuftFeuchtInnen.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbLuftFeuchtInnen.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbWindricht // lbWindricht
...@@ -254,7 +254,7 @@ namespace Wetterstation ...@@ -254,7 +254,7 @@ namespace Wetterstation
this.lbWindricht.Name = "lbWindricht"; this.lbWindricht.Name = "lbWindricht";
this.lbWindricht.Size = new System.Drawing.Size(120, 32); this.lbWindricht.Size = new System.Drawing.Size(120, 32);
this.lbWindricht.TabIndex = 18; this.lbWindricht.TabIndex = 18;
this.lbWindricht.Text = "NA"; this.lbWindricht.Text = "---";
this.lbWindricht.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lbWindricht.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// lbUhr // lbUhr
...@@ -407,7 +407,7 @@ namespace Wetterstation ...@@ -407,7 +407,7 @@ namespace Wetterstation
this.lbLuftfeuchtAussen.Name = "lbLuftfeuchtAussen"; this.lbLuftfeuchtAussen.Name = "lbLuftfeuchtAussen";
this.lbLuftfeuchtAussen.Size = new System.Drawing.Size(222, 70); this.lbLuftfeuchtAussen.Size = new System.Drawing.Size(222, 70);
this.lbLuftfeuchtAussen.TabIndex = 37; this.lbLuftfeuchtAussen.TabIndex = 37;
this.lbLuftfeuchtAussen.Text = "NA %"; this.lbLuftfeuchtAussen.Text = "---";
this.lbLuftfeuchtAussen.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbLuftfeuchtAussen.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbTextLuftfeuchtAussen // lbTextLuftfeuchtAussen
...@@ -446,7 +446,7 @@ namespace Wetterstation ...@@ -446,7 +446,7 @@ namespace Wetterstation
this.lbLuftdruck.Name = "lbLuftdruck"; this.lbLuftdruck.Name = "lbLuftdruck";
this.lbLuftdruck.Size = new System.Drawing.Size(340, 70); this.lbLuftdruck.Size = new System.Drawing.Size(340, 70);
this.lbLuftdruck.TabIndex = 40; this.lbLuftdruck.TabIndex = 40;
this.lbLuftdruck.Text = "NA hPa"; this.lbLuftdruck.Text = "---";
this.lbLuftdruck.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbLuftdruck.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbHintergrund // lbHintergrund
...@@ -529,12 +529,12 @@ namespace Wetterstation ...@@ -529,12 +529,12 @@ namespace Wetterstation
this.lbTempInMax.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147))))); this.lbTempInMax.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147)))));
this.lbTempInMax.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbTempInMax.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTempInMax.ForeColor = System.Drawing.SystemColors.ButtonFace; this.lbTempInMax.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.lbTempInMax.Location = new System.Drawing.Point(129, 83); this.lbTempInMax.Location = new System.Drawing.Point(109, 83);
this.lbTempInMax.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbTempInMax.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTempInMax.Name = "lbTempInMax"; this.lbTempInMax.Name = "lbTempInMax";
this.lbTempInMax.Size = new System.Drawing.Size(51, 17); this.lbTempInMax.Size = new System.Drawing.Size(71, 17);
this.lbTempInMax.TabIndex = 51; this.lbTempInMax.TabIndex = 51;
this.lbTempInMax.Text = "NA C°"; this.lbTempInMax.Text = "---";
this.lbTempInMax.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbTempInMax.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbTempOutMax // lbTempOutMax
...@@ -542,12 +542,12 @@ namespace Wetterstation ...@@ -542,12 +542,12 @@ namespace Wetterstation
this.lbTempOutMax.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147))))); this.lbTempOutMax.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147)))));
this.lbTempOutMax.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbTempOutMax.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTempOutMax.ForeColor = System.Drawing.SystemColors.ButtonFace; this.lbTempOutMax.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.lbTempOutMax.Location = new System.Drawing.Point(129, 212); this.lbTempOutMax.Location = new System.Drawing.Point(109, 212);
this.lbTempOutMax.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbTempOutMax.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTempOutMax.Name = "lbTempOutMax"; this.lbTempOutMax.Name = "lbTempOutMax";
this.lbTempOutMax.Size = new System.Drawing.Size(51, 17); this.lbTempOutMax.Size = new System.Drawing.Size(71, 17);
this.lbTempOutMax.TabIndex = 52; this.lbTempOutMax.TabIndex = 52;
this.lbTempOutMax.Text = "NA C°"; this.lbTempOutMax.Text = "---";
this.lbTempOutMax.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbTempOutMax.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbTempOutMin // lbTempOutMin
...@@ -555,12 +555,12 @@ namespace Wetterstation ...@@ -555,12 +555,12 @@ namespace Wetterstation
this.lbTempOutMin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147))))); this.lbTempOutMin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147)))));
this.lbTempOutMin.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbTempOutMin.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTempOutMin.ForeColor = System.Drawing.SystemColors.ButtonFace; this.lbTempOutMin.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.lbTempOutMin.Location = new System.Drawing.Point(129, 229); this.lbTempOutMin.Location = new System.Drawing.Point(109, 229);
this.lbTempOutMin.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbTempOutMin.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTempOutMin.Name = "lbTempOutMin"; this.lbTempOutMin.Name = "lbTempOutMin";
this.lbTempOutMin.Size = new System.Drawing.Size(51, 17); this.lbTempOutMin.Size = new System.Drawing.Size(71, 17);
this.lbTempOutMin.TabIndex = 54; this.lbTempOutMin.TabIndex = 54;
this.lbTempOutMin.Text = "NA C°"; this.lbTempOutMin.Text = "---";
this.lbTempOutMin.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbTempOutMin.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbTempInMin // lbTempInMin
...@@ -568,12 +568,12 @@ namespace Wetterstation ...@@ -568,12 +568,12 @@ namespace Wetterstation
this.lbTempInMin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147))))); this.lbTempInMin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(10)))), ((int)(((byte)(80)))), ((int)(((byte)(147)))));
this.lbTempInMin.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbTempInMin.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbTempInMin.ForeColor = System.Drawing.SystemColors.ButtonFace; this.lbTempInMin.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.lbTempInMin.Location = new System.Drawing.Point(129, 100); this.lbTempInMin.Location = new System.Drawing.Point(109, 100);
this.lbTempInMin.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbTempInMin.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lbTempInMin.Name = "lbTempInMin"; this.lbTempInMin.Name = "lbTempInMin";
this.lbTempInMin.Size = new System.Drawing.Size(51, 17); this.lbTempInMin.Size = new System.Drawing.Size(71, 17);
this.lbTempInMin.TabIndex = 53; this.lbTempInMin.TabIndex = 53;
this.lbTempInMin.Text = "NA C°"; this.lbTempInMin.Text = "---";
this.lbTempInMin.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbTempInMin.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbForecastTemp1 // lbForecastTemp1
...@@ -585,7 +585,7 @@ namespace Wetterstation ...@@ -585,7 +585,7 @@ namespace Wetterstation
this.lbForecastTemp1.Name = "lbForecastTemp1"; this.lbForecastTemp1.Name = "lbForecastTemp1";
this.lbForecastTemp1.Size = new System.Drawing.Size(51, 17); this.lbForecastTemp1.Size = new System.Drawing.Size(51, 17);
this.lbForecastTemp1.TabIndex = 55; this.lbForecastTemp1.TabIndex = 55;
this.lbForecastTemp1.Text = "NA °C"; this.lbForecastTemp1.Text = "---";
this.lbForecastTemp1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbForecastTemp1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbForecastTemp2 // lbForecastTemp2
...@@ -597,7 +597,7 @@ namespace Wetterstation ...@@ -597,7 +597,7 @@ namespace Wetterstation
this.lbForecastTemp2.Name = "lbForecastTemp2"; this.lbForecastTemp2.Name = "lbForecastTemp2";
this.lbForecastTemp2.Size = new System.Drawing.Size(51, 17); this.lbForecastTemp2.Size = new System.Drawing.Size(51, 17);
this.lbForecastTemp2.TabIndex = 56; this.lbForecastTemp2.TabIndex = 56;
this.lbForecastTemp2.Text = "NA °C"; this.lbForecastTemp2.Text = "---";
this.lbForecastTemp2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbForecastTemp2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbForecastTemp3 // lbForecastTemp3
...@@ -609,7 +609,7 @@ namespace Wetterstation ...@@ -609,7 +609,7 @@ namespace Wetterstation
this.lbForecastTemp3.Name = "lbForecastTemp3"; this.lbForecastTemp3.Name = "lbForecastTemp3";
this.lbForecastTemp3.Size = new System.Drawing.Size(51, 17); this.lbForecastTemp3.Size = new System.Drawing.Size(51, 17);
this.lbForecastTemp3.TabIndex = 57; this.lbForecastTemp3.TabIndex = 57;
this.lbForecastTemp3.Text = "NA °C"; this.lbForecastTemp3.Text = "---";
this.lbForecastTemp3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbForecastTemp3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbForecastTemp4 // lbForecastTemp4
...@@ -621,7 +621,7 @@ namespace Wetterstation ...@@ -621,7 +621,7 @@ namespace Wetterstation
this.lbForecastTemp4.Name = "lbForecastTemp4"; this.lbForecastTemp4.Name = "lbForecastTemp4";
this.lbForecastTemp4.Size = new System.Drawing.Size(51, 17); this.lbForecastTemp4.Size = new System.Drawing.Size(51, 17);
this.lbForecastTemp4.TabIndex = 58; this.lbForecastTemp4.TabIndex = 58;
this.lbForecastTemp4.Text = "NA °C"; this.lbForecastTemp4.Text = "---";
this.lbForecastTemp4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbForecastTemp4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbForecastTemp5 // lbForecastTemp5
...@@ -633,7 +633,7 @@ namespace Wetterstation ...@@ -633,7 +633,7 @@ namespace Wetterstation
this.lbForecastTemp5.Name = "lbForecastTemp5"; this.lbForecastTemp5.Name = "lbForecastTemp5";
this.lbForecastTemp5.Size = new System.Drawing.Size(51, 17); this.lbForecastTemp5.Size = new System.Drawing.Size(51, 17);
this.lbForecastTemp5.TabIndex = 59; this.lbForecastTemp5.TabIndex = 59;
this.lbForecastTemp5.Text = "NA °C"; this.lbForecastTemp5.Text = "---";
this.lbForecastTemp5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbForecastTemp5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// cartesianChart1 // cartesianChart1
...@@ -707,7 +707,7 @@ namespace Wetterstation ...@@ -707,7 +707,7 @@ namespace Wetterstation
this.lbRain1h.Name = "lbRain1h"; this.lbRain1h.Name = "lbRain1h";
this.lbRain1h.Size = new System.Drawing.Size(52, 17); this.lbRain1h.Size = new System.Drawing.Size(52, 17);
this.lbRain1h.TabIndex = 65; this.lbRain1h.TabIndex = 65;
this.lbRain1h.Text = "NA l/h"; this.lbRain1h.Text = "---";
this.lbRain1h.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbRain1h.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbRain3h // lbRain3h
...@@ -720,7 +720,7 @@ namespace Wetterstation ...@@ -720,7 +720,7 @@ namespace Wetterstation
this.lbRain3h.Name = "lbRain3h"; this.lbRain3h.Name = "lbRain3h";
this.lbRain3h.Size = new System.Drawing.Size(52, 17); this.lbRain3h.Size = new System.Drawing.Size(52, 17);
this.lbRain3h.TabIndex = 66; this.lbRain3h.TabIndex = 66;
this.lbRain3h.Text = "NA l/h"; this.lbRain3h.Text = "---";
this.lbRain3h.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbRain3h.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbSnow3h // lbSnow3h
...@@ -733,7 +733,7 @@ namespace Wetterstation ...@@ -733,7 +733,7 @@ namespace Wetterstation
this.lbSnow3h.Name = "lbSnow3h"; this.lbSnow3h.Name = "lbSnow3h";
this.lbSnow3h.Size = new System.Drawing.Size(68, 17); this.lbSnow3h.Size = new System.Drawing.Size(68, 17);
this.lbSnow3h.TabIndex = 70; this.lbSnow3h.TabIndex = 70;
this.lbSnow3h.Text = "NA cm/h"; this.lbSnow3h.Text = "---";
this.lbSnow3h.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbSnow3h.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lbSnow1h // lbSnow1h
...@@ -746,7 +746,7 @@ namespace Wetterstation ...@@ -746,7 +746,7 @@ namespace Wetterstation
this.lbSnow1h.Name = "lbSnow1h"; this.lbSnow1h.Name = "lbSnow1h";
this.lbSnow1h.Size = new System.Drawing.Size(68, 17); this.lbSnow1h.Size = new System.Drawing.Size(68, 17);
this.lbSnow1h.TabIndex = 69; this.lbSnow1h.TabIndex = 69;
this.lbSnow1h.Text = "NA cm/h"; this.lbSnow1h.Text = "---";
this.lbSnow1h.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lbSnow1h.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// lb3hS // lb3hS
......
...@@ -344,7 +344,6 @@ namespace Wetterstation ...@@ -344,7 +344,6 @@ namespace Wetterstation
Console.WriteLine(message); Console.WriteLine(message);
try try
{ {
dynamic weatherData = JsonConvert.DeserializeObject(message.ToString()); dynamic weatherData = JsonConvert.DeserializeObject(message.ToString());
if (weatherData[0]["client"] == WeatherstationSettings.node1Id && weatherData[0]["sensor"] == WeatherstationSettings.node1Innen) if (weatherData[0]["client"] == WeatherstationSettings.node1Id && weatherData[0]["sensor"] == WeatherstationSettings.node1Innen)
{ {
...@@ -359,6 +358,8 @@ namespace Wetterstation ...@@ -359,6 +358,8 @@ namespace Wetterstation
if (weatherData[0]["client"] == node1In.host && weatherData[0]["sensor"] == node1In.name && weatherData[0]["temperature"] != null) if (weatherData[0]["client"] == node1In.host && weatherData[0]["sensor"] == node1In.name && weatherData[0]["temperature"] != null)
{ {
node1In.temperature = true; node1In.temperature = true;
if (node1In.tempMin == 0) node1In.tempMin = weatherData[0]["temperature"];
if (node1In.tempMax == 0) node1In.tempMax = weatherData[0]["temperature"];
if ((double)weatherData[0]["temperature"] > node1In.tempMax) node1In.tempMax = weatherData[0]["temperature"]; if ((double)weatherData[0]["temperature"] > node1In.tempMax) node1In.tempMax = weatherData[0]["temperature"];
if ((double)weatherData[0]["temperature"] < node1In.tempMin) node1In.tempMin = weatherData[0]["temperature"]; if ((double)weatherData[0]["temperature"] < node1In.tempMin) node1In.tempMin = weatherData[0]["temperature"];
lbInnenTemp.Invoke(new Action(() => { lbInnenTemp.Text = weatherData[0]["temperature"] + " °C"; })); lbInnenTemp.Invoke(new Action(() => { lbInnenTemp.Text = weatherData[0]["temperature"] + " °C"; }));
...@@ -390,6 +391,8 @@ namespace Wetterstation ...@@ -390,6 +391,8 @@ namespace Wetterstation
if (weatherData[0]["client"] == node1Out.host && weatherData[0]["sensor"] == node1Out.name && weatherData[0]["temperature"] != null) if (weatherData[0]["client"] == node1Out.host && weatherData[0]["sensor"] == node1Out.name && weatherData[0]["temperature"] != null)
{ {
node1Out.temperature = true; node1Out.temperature = true;
if (node1In.tempMin == 0) node1Out.tempMin = weatherData[0]["temperature"];
if (node1In.tempMax == 0) node1Out.tempMax = weatherData[0]["temperature"];
if ((double)weatherData[0]["temperature"] > node1Out.tempMax) node1Out.tempMax = weatherData[0]["temperature"]; if ((double)weatherData[0]["temperature"] > node1Out.tempMax) node1Out.tempMax = weatherData[0]["temperature"];
if ((double)weatherData[0]["temperature"] < node1Out.tempMin) node1Out.tempMin = weatherData[0]["temperature"]; if ((double)weatherData[0]["temperature"] < node1Out.tempMin) node1Out.tempMin = weatherData[0]["temperature"];
lbAussenTemp.Invoke(new Action(() => { lbAussenTemp.Text = weatherData[0]["temperature"] + " °C"; })); lbAussenTemp.Invoke(new Action(() => { lbAussenTemp.Text = weatherData[0]["temperature"] + " °C"; }));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment