From 859894de23f27e2429a16ed04db99fd0bcb1b076 Mon Sep 17 00:00:00 2001 From: Tobias Edler Date: Tue, 3 Dec 2024 20:11:20 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Tankanzeigen-Einstellungen=20hinzugef=C3=BC?= =?UTF-8?q?gt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/obp60task/gen_set.pl | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/obp60task/gen_set.pl b/lib/obp60task/gen_set.pl index a83bda2..f986e7f 100755 --- a/lib/obp60task/gen_set.pl +++ b/lib/obp60task/gen_set.pl @@ -1,5 +1,5 @@ #!/bin/perl -w -#A tool to generate that part of config.json that deals with pages and fields. +#A tool to generate the part of config.json that deals with pages and fields. #List of all pages and the number of parameters they expect. %NoOfFieldsPerPage=qw( @@ -77,7 +77,7 @@ for ($PageNo=1;$PageNo<=$NoOfPages;$PageNo++){ print "\t",'"category": "OBP60 Page ',$PageNo,'",',"\n"; print "\t",'"capabilities": {',"\n"; print "\t",' "obp60":"true"',"\n"; - print "\t",'},',"\n"; + print "\t",'}, ls',"\n"; print "\t",'"condition":['; foreach $page (@Pages) { if($NoOfFieldsPerPage{$page}>=$FieldNo){ @@ -87,4 +87,25 @@ for ($PageNo=1;$PageNo<=$NoOfPages;$PageNo++){ print "\b],\n"; print '},',"\n"; } + print "{\n"; + print "\t","\"name\": \"page", $PageNo,"fluid\",\n"; + print "\t",'"label": "Fluid type",',"\n"; + print "\t",'"type": "list",',"\n"; + print "\t",'"default": "0",',"\n"; + print "\t",'"list": [',"\n"; + print "\t",'{"l":"Fuel (0)","v":"0"},',"\n"; + print "\t",'{"l":"Water (1)","v":"1"},',"\n"; + print "\t",'{"l":"Gray Water (2)","v":"2"},',"\n"; + print "\t",'{"l":"Live Well (3)","v":"3"},',"\n"; + print "\t",'{"l":"Oil (4)","v":"4"},',"\n"; + print "\t",'{"l":"Black Water (5)","v":"5"},',"\n"; + print "\t",'{"l":"Fuel Gasoline (6)","v":"6"}',"\n"; + print "\t",'],',"\n"; + print "\t",'"description": "Fluid type in tank",',"\n"; + print "\t",'"category": "OBP60 Page ',$PageNo,'",',"\n"; + print "\t",'"capabilities": {',"\n"; + print "\t",'"obp60":"true"',"\n"; + print "\t",'},',"\n"; + print "\t",'"condition":[{"page',$PageNo,'type":"Fluid"}]',"\n"; + print '},',"\n"; } From 0692d0687dc72cf8456bbf18cd8d423a53c90313 Mon Sep 17 00:00:00 2001 From: TobiasE-github <142840185+TobiasE-github@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:59:57 +0100 Subject: [PATCH 2/2] Aktualisieren von gen_set.pl, Typo entfernt --- lib/obp60task/gen_set.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/obp60task/gen_set.pl b/lib/obp60task/gen_set.pl index f986e7f..0f7c588 100755 --- a/lib/obp60task/gen_set.pl +++ b/lib/obp60task/gen_set.pl @@ -77,7 +77,7 @@ for ($PageNo=1;$PageNo<=$NoOfPages;$PageNo++){ print "\t",'"category": "OBP60 Page ',$PageNo,'",',"\n"; print "\t",'"capabilities": {',"\n"; print "\t",' "obp60":"true"',"\n"; - print "\t",'}, ls',"\n"; + print "\t",'}, ',"\n"; print "\t",'"condition":['; foreach $page (@Pages) { if($NoOfFieldsPerPage{$page}>=$FieldNo){