Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
norbert-walter committed Jan 14, 2025
2 parents 574deac + bbdbe47 commit d2ee05a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/obp60task/PageFluid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ static unsigned char gasoline_bits[] = {

class PageFluid : public Page{
bool keylock = false; // Keylock
bool holdvalues = false;
int fluidtype;

public:
PageFluid(CommonData &common){
common.logger->logDebug(GwLog::LOG,"Instantiate PageFluid");
holdvalues = common.config->getBool(common.config->holdvalues);
}

virtual int handleKey(int key){
Expand All @@ -83,6 +85,9 @@ class PageFluid : public Page{
GwConfigHandler *config = commonData.config;
GwLog *logger=commonData.logger;

// Old values for hold function
static double value1old;

// Get config data
String flashLED = config->getString(config->flashLED);
String backlightMode = config->getString(config->backlight);
Expand All @@ -93,13 +98,14 @@ class PageFluid : public Page{
setFlashLED(false);
}

// Logging boat values
LOG_DEBUG(GwLog::LOG,"Drawing at PageFluid");

GwApi::BoatValue *bvalue1 = pageData.values[0];
String name1 = bvalue1->getName();
double value1 = bvalue1->value;
bool valid1 = bvalue1->valid;
if (holdvalues and bvalue1->valid) {
value1old = bvalue1->value;
}

// Logging boat values
LOG_DEBUG(GwLog::LOG,"Drawing at PageFluid: value=%f", bvalue1->value);

// Draw page
//***********************************************************
Expand Down
31 changes: 31 additions & 0 deletions lib/obp60task/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,9 @@
},
{
"page1type": "WindRoseFlex"
},
{
"page1type": "Fluid"
}
]
},
Expand Down Expand Up @@ -1266,7 +1269,11 @@
},
{
"page2type": "WindRoseFlex"
},
{
"page2type": "Fluid"
}

]
},
{
Expand Down Expand Up @@ -1517,6 +1524,9 @@
},
{
"page3type": "WindRoseFlex"
},
{
"page3type": "Fluid"
}
]
},
Expand Down Expand Up @@ -1765,6 +1775,9 @@
},
{
"page4type": "WindRoseFlex"
},
{
"page4type": "Fluid"
}
]
},
Expand Down Expand Up @@ -2010,6 +2023,9 @@
},
{
"page5type": "WindRoseFlex"
},
{
"page5type": "Fluid"
}
]
},
Expand Down Expand Up @@ -2252,6 +2268,9 @@
},
{
"page6type": "WindRoseFlex"
},
{
"page6type": "Fluid"
}
]
},
Expand Down Expand Up @@ -2491,6 +2510,9 @@
},
{
"page7type": "WindRoseFlex"
},
{
"page7type": "Fluid"
}
]
},
Expand Down Expand Up @@ -2727,6 +2749,9 @@
},
{
"page8type": "WindRoseFlex"
},
{
"page8type": "Fluid"
}
]
},
Expand Down Expand Up @@ -2960,6 +2985,9 @@
},
{
"page9type": "WindRoseFlex"
},
{
"page9type": "Fluid"
}
]
},
Expand Down Expand Up @@ -3190,6 +3218,9 @@
},
{
"page10type": "WindRoseFlex"
},
{
"page10type": "Fluid"
}
]
},
Expand Down

0 comments on commit d2ee05a

Please sign in to comment.