Skip to content

Commit

Permalink
version 1.02
Browse files Browse the repository at this point in the history
  • Loading branch information
fra589 committed Aug 20, 2024
1 parent 700dbd0 commit 2b20558
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 8 deletions.
4 changes: 2 additions & 2 deletions WeThermic/WeThermic.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
#define COPYRIGHT "G.Brière 2024-2024"
#define APP_NAME "WeThermic"
#define APP_VERSION_MAJOR "1"
#define APP_VERSION_MINOR "01"
#define APP_VERSION_DATE "20240811"
#define APP_VERSION_MINOR "02"
#define APP_VERSION_DATE "20240820"
#define APP_VERSION_STRING "v" APP_VERSION_MAJOR "." APP_VERSION_MINOR "." APP_VERSION_DATE
#define APP_NAME_VERSION APP_NAME " - " APP_VERSION_STRING "\0"

Expand Down
5 changes: 5 additions & 0 deletions WeThermic/data.src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ <h1>Settings :</h1>
<td><input type="radio" name="gOrder2" id="gOrder21" onchange="changeGraphOrder(this);" value="Pressure" /><label for="gOrder21">Pressure</label></td>
<td><input type="radio" name="gOrder2" id="gOrder22" onchange="changeGraphOrder(this);" value="Temperature" /><label for="gOrder22">Temperature</label></td>
</tr>
<tr class="borderSup">
<td colspan="2">Y scale position:</td>
<td><input type="radio" name="scalesP" id="scalesPL" onchange="changeScalesPos(this);" value="left" /><label for="scalesPL">Left</label></td>
<td><input type="radio" name="scalesP" id="scalesPR" onchange="changeScalesPos(this);" value="right" /><label for="scalesPR">Right</label></td>
</tr>
</tbody>
</table>
</span>
Expand Down
29 changes: 28 additions & 1 deletion WeThermic/data.src/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ var graph1 = "Pressure";
var graph2 = "Temperature";
graphOrderChanged = false;

// Position échelles Y
var scalesPositions = 'left';

// Durée de calcul des moyennes
var largeurMoyVent = 180; // Moyenne sur 1 minute 30s
var largeurMoyPres = 180; // Moyenne sur 1 minute 30s
Expand Down Expand Up @@ -174,6 +177,17 @@ async function index_onload() {
document.getElementById("lMoyTemp").value = largeurMoyTemp / 60;
inputLargeurTemp();

// Position des l'échelles Y
var scalesPref = localStorage.getItem("scalesPositions");
if (scalesPref !== null) {
scalesPositions = scalesPref;
}
if (scalesPositions == 'left') {
document.getElementById("scalesPL").checked = true;
} else if (scalesPositions == 'right') {
document.getElementById("scalesPR").checked = true;
}

var chronoPref = localStorage.getItem("chronoMaxTime");
if (chronoPref !== null) {
chronoMaxTime = Number(chronoPref);
Expand Down Expand Up @@ -292,6 +306,8 @@ async function index_onload() {
y: {
type: 'linear',
beginAtZero: true,
display: true,
position: scalesPositions,
suggestedMax: 3,
ticks: {
color: couleurVent
Expand Down Expand Up @@ -378,6 +394,7 @@ async function index_onload() {
type: 'linear',
beginAtZero: false,
display: true,
position: scalesPositions,
ticks: {
color: couleurPression
},
Expand Down Expand Up @@ -463,7 +480,7 @@ async function index_onload() {
type: 'linear',
beginAtZero: false,
display: true,
position:'left',
position: scalesPositions,
ticks: {
color: couleurTempCtn
},
Expand Down Expand Up @@ -1944,6 +1961,16 @@ function changeGraphOrder(radio) {
graphOrderChanged = true;
}

function changeScalesPos(radio) {
scalesPositions = radio.value;
// Repositionne les échelles
Window.graphVent.options.scales['y'].position = scalesPositions;
Window.graphPres.options.scales['y'].position = scalesPositions;
Window.graphTemp.options.scales['y'].position = scalesPositions;

localStorage.setItem("scalesPositions", scalesPositions);
}

function setRadValue(radName, valeur) {
for (rad of document.getElementsByName(radName)) {
if (rad.value == valeur) {
Expand Down
5 changes: 4 additions & 1 deletion WeThermic/data.src/style_principal.css
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ border-top: 1px solid white;
#tblGraphOrder {
width: 80%;
margin: auto;
border-collapse: collapse;
}
.borderSup {
border-top: 1px solid;
}


2 changes: 1 addition & 1 deletion WeThermic/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
&nbsp;
<input type=radio name=theme id=clair value=clair onchange='changeTheme("clair")'>
<label for=clair>Clear</label></span><table id=activeColors><tbody><tr id=actr1><td><div id=iw class=colorButton onclick='openColor("iw")'></div><td>Instand wind<td><div id=ip class=colorButton onclick='openColor("ip")'></div><td>Instand pressure<td><div id=it class=colorButton onclick='openColor("it")'></div><td>Instand temperature<tr id=actr2><td><div id=aw class=colorButton onclick='openColor("aw")'></div><td>Average wind<td><div id=ap class=colorButton onclick='openColor("ap")'></div><td>Average pressure<td><div id=at class=colorButton onclick='openColor("at")'></div><td>Average temperature</table></div></fieldset><fieldset class=settingFieldset id=graphOrder><legend>Graph order</legend>
<span><table id=tblGraphOrder><tbody><tr><td>Upper graph:<td><input type=radio name=gOrder0 id=gOrder00 onchange=changeGraphOrder(this) value=Wind><label for=gOrder00>Wind</label><td><input type=radio name=gOrder0 id=gOrder01 onchange=changeGraphOrder(this) value=Pressure><label for=gOrder01>Pressure</label><td><input type=radio name=gOrder0 id=gOrder02 onchange=changeGraphOrder(this) value=Temperature><label for=gOrder02>Temperature</label><tr><td>Middle graph:<td><input type=radio name=gOrder1 id=gOrder10 onchange=changeGraphOrder(this) value=Wind><label for=gOrder10>Wind</label><td><input type=radio name=gOrder1 id=gOrder11 onchange=changeGraphOrder(this) value=Pressure><label for=gOrder11>Pressure</label><td><input type=radio name=gOrder1 id=gOrder12 onchange=changeGraphOrder(this) value=Temperature><label for=gOrder12>Temperature</label><tr><td>Bottom graph:<td><input type=radio name=gOrder2 id=gOrder20 onchange=changeGraphOrder(this) value=Wind><label for=gOrder20>Wind</label><td><input type=radio name=gOrder2 id=gOrder21 onchange=changeGraphOrder(this) value=Pressure><label for=gOrder21>Pressure</label><td><input type=radio name=gOrder2 id=gOrder22 onchange=changeGraphOrder(this) value=Temperature><label for=gOrder22>Temperature</label></table></span></fieldset><fieldset class=settingFieldset id=dureeFieldset><legend>Graph time length / refresh</legend>
<span><table id=tblGraphOrder><tbody><tr><td>Upper graph:<td><input type=radio name=gOrder0 id=gOrder00 onchange=changeGraphOrder(this) value=Wind><label for=gOrder00>Wind</label><td><input type=radio name=gOrder0 id=gOrder01 onchange=changeGraphOrder(this) value=Pressure><label for=gOrder01>Pressure</label><td><input type=radio name=gOrder0 id=gOrder02 onchange=changeGraphOrder(this) value=Temperature><label for=gOrder02>Temperature</label><tr><td>Middle graph:<td><input type=radio name=gOrder1 id=gOrder10 onchange=changeGraphOrder(this) value=Wind><label for=gOrder10>Wind</label><td><input type=radio name=gOrder1 id=gOrder11 onchange=changeGraphOrder(this) value=Pressure><label for=gOrder11>Pressure</label><td><input type=radio name=gOrder1 id=gOrder12 onchange=changeGraphOrder(this) value=Temperature><label for=gOrder12>Temperature</label><tr><td>Bottom graph:<td><input type=radio name=gOrder2 id=gOrder20 onchange=changeGraphOrder(this) value=Wind><label for=gOrder20>Wind</label><td><input type=radio name=gOrder2 id=gOrder21 onchange=changeGraphOrder(this) value=Pressure><label for=gOrder21>Pressure</label><td><input type=radio name=gOrder2 id=gOrder22 onchange=changeGraphOrder(this) value=Temperature><label for=gOrder22>Temperature</label><tr class=borderSup><td colspan=2>Y scale position:<td><input type=radio name=scalesP id=scalesPL onchange=changeScalesPos(this) value=left><label for=scalesPL>Left</label><td><input type=radio name=scalesP id=scalesPR onchange=changeScalesPos(this) value=right><label for=scalesPR>Right</label></table></span></fieldset><fieldset class=settingFieldset id=dureeFieldset><legend>Graph time length / refresh</legend>
<span class=nowarp><input type=radio name=rDuree id=d500 value=500 onchange=changeDuree(500) checked>
<label for=d500>5 mn / 0.5 s</label>
&nbsp;
Expand Down
4 changes: 2 additions & 2 deletions WeThermic/data/scripts.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WeThermic/data/style_principal.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2b20558

Please sign in to comment.