1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-14 06:23:07 +01:00

working spi task, measure with dms22b

This commit is contained in:
andreas
2024-03-02 17:51:23 +01:00
parent 5356b783c3
commit 0c94293ccb
7 changed files with 147 additions and 53 deletions

View File

@@ -70,6 +70,15 @@ class GwConfigHandler: public GwConfigDefinitions{
target=i->asInt();
return true;
}
bool getValue(float &target, const String &name, float defaultv=0){
GwConfigInterface *i=getConfigItem(name);
if (!i){
target=defaultv;
return false;
}
target=i->asFloat();
return true;
}
bool getValue(bool &target, const String name, bool defaultv=false){
GwConfigInterface *i=getConfigItem(name);
if (!i){

View File

@@ -37,6 +37,9 @@ class GwConfigInterface{
virtual int asInt() const{
return (int)value.toInt();
}
virtual float asFloat() const{
return value.toFloat();
}
String getName() const{
return name;
}