Adding sw ver to template engine
This commit is contained in:
parent
34d46ef768
commit
d980fdae1a
@ -130,6 +130,9 @@ void TemplatingEngine::initialize(float angle, float gravitySG,
|
|||||||
setVal(TPL_GRAVITY_CORR_P, convertToPlato(corrGravitySG), 1);
|
setVal(TPL_GRAVITY_CORR_P, convertToPlato(corrGravitySG), 1);
|
||||||
setVal(TPL_GRAVITY_UNIT, myConfig.getGravityFormat());
|
setVal(TPL_GRAVITY_UNIT, myConfig.getGravityFormat());
|
||||||
|
|
||||||
|
setVal(TPL_SW_VER, CFG_APPVER);
|
||||||
|
setVal(TPL_SW_REV, CFG_GITREV);
|
||||||
|
|
||||||
#if LOG_LEVEL == 6
|
#if LOG_LEVEL == 6
|
||||||
// dumpAll();
|
// dumpAll();
|
||||||
#endif
|
#endif
|
||||||
|
@ -53,6 +53,8 @@ SOFTWARE.
|
|||||||
#define TPL_GRAVITY_CORR_G "${corr-gravity-sg}"
|
#define TPL_GRAVITY_CORR_G "${corr-gravity-sg}"
|
||||||
#define TPL_GRAVITY_CORR_P "${corr-gravity-plato}"
|
#define TPL_GRAVITY_CORR_P "${corr-gravity-plato}"
|
||||||
#define TPL_GRAVITY_UNIT "${gravity-unit}" // G or P
|
#define TPL_GRAVITY_UNIT "${gravity-unit}" // G or P
|
||||||
|
#define TPL_SW_VER "${sw-ver}"
|
||||||
|
#define TPL_SW_REV "${sw-rev}"
|
||||||
|
|
||||||
#define TPL_FNAME_HTTP1 "/http-1.tpl"
|
#define TPL_FNAME_HTTP1 "/http-1.tpl"
|
||||||
#define TPL_FNAME_HTTP2 "/http-2.tpl"
|
#define TPL_FNAME_HTTP2 "/http-2.tpl"
|
||||||
|
@ -99,4 +99,10 @@ These are the format keys available for use in the format.
|
|||||||
* - ${gravity-unit}
|
* - ${gravity-unit}
|
||||||
- Gravity format, `G` or `P`
|
- Gravity format, `G` or `P`
|
||||||
- G
|
- G
|
||||||
|
* - ${sw-ver}
|
||||||
|
- Software version
|
||||||
|
- 1.1.0
|
||||||
|
* - ${sw-rev}
|
||||||
|
- Software revision (git hash)
|
||||||
|
- ..e456743
|
||||||
|
|
||||||
|
@ -9,8 +9,31 @@ Create formula
|
|||||||
|
|
||||||
Here you can enter up to 10 values (angles + gravity) that is then used to create the formula. Angles equal to zero will be regarded as empty even if there is a gravity reading.
|
Here you can enter up to 10 values (angles + gravity) that is then used to create the formula. Angles equal to zero will be regarded as empty even if there is a gravity reading.
|
||||||
|
|
||||||
|
When you submit the values the device will try create a forumla with increasing level of complexity. It will start
|
||||||
|
with a order 2 formula and then try 3 and 4.
|
||||||
|
|
||||||
|
Once the formula has been created it will validate the formula against the supplied angles/gravity and if there is a too
|
||||||
|
high difference, it will fail. You can adjust the sensitivity under advanced settings if you have issues.
|
||||||
|
|
||||||
|
Under the Error Log you will also find hints to what problem the formula creator encountered. Here is an example:
|
||||||
|
|
||||||
|
`CALC: Validation failed on angle 33.430000, deviation too large 5.86, formula order 4`
|
||||||
|
|
||||||
|
`CALC: Validation failed on angle 33.430000, deviation too large 3.14, formula order 2`
|
||||||
|
|
||||||
|
This means that the angle 33.43 had a deviation of 5.8 SG and since the default threashold is 3, it will fail. You
|
||||||
|
can also see that it has failed on that point in both a order 2 and 4 formula.
|
||||||
|
|
||||||
|
.. image:: images/qa_1.png
|
||||||
|
:width: 400
|
||||||
|
:alt: Example of deviating value
|
||||||
|
|
||||||
|
So in this case you can either increase the threashold or remove the angle that has an issue. You can also
|
||||||
|
use the graph on the calibration page to identify angles that is probably not correct.
|
||||||
|
|
||||||
.. image:: images/formula2.png
|
.. image:: images/formula2.png
|
||||||
:width: 800
|
:width: 800
|
||||||
:alt: Formula graph
|
:alt: Formula graph
|
||||||
|
|
||||||
Once the formula is created a graph over the entered values and a simulation of the formula will give you a nice overview on how the formula will work.
|
Once the formula is created a graph over the entered values and a simulation of the formula will give you a nice overview on how the formula will work.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user