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:
@@ -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){
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user