Add settings for start page

This commit is contained in:
norbert-walter 2024-01-07 14:13:54 +01:00
parent dc118a51e7
commit 6e7dfc6fd9
2 changed files with 17 additions and 2 deletions

View File

@ -766,7 +766,7 @@
}, },
{ {
"name": "visiblePages", "name": "visiblePages",
"label": "number of pages", "label": "Number of Pages",
"type": "number", "type": "number",
"check": "checkMinMax", "check": "checkMinMax",
"min": 1, "min": 1,
@ -777,6 +777,19 @@
"obp60":"true" "obp60":"true"
} }
}, },
{
"name": "startPage",
"label": "Start Page",
"type": "number",
"check": "checkMinMax",
"min": 1,
"max": 10,
"default":"1",
"category":"OBP60 Pages",
"capabilities": {
"obp60":"true"
}
},
{ {
"name": "page1type", "name": "page1type",
"label": "Type", "label": "Type",

View File

@ -370,7 +370,9 @@ void OBP60Task(GwApi *api){
GwApi::BoatValue *lon = boatValues.findValueOrCreate("LON"); // Load GpsLongitude GwApi::BoatValue *lon = boatValues.findValueOrCreate("LON"); // Load GpsLongitude
LOG_DEBUG(GwLog::LOG,"obp60task: start mainloop"); LOG_DEBUG(GwLog::LOG,"obp60task: start mainloop");
int pageNumber=0; // Set start page
// int pageNumber = 0;
int pageNumber = int(api->getConfig()->getConfigItem(api->getConfig()->startPage,true)->asInt()) - 1;
int lastPage=pageNumber; int lastPage=pageNumber;
commonData.time = boatValues.findValueOrCreate("GPST"); // Load GpsTime commonData.time = boatValues.findValueOrCreate("GPST"); // Load GpsTime