mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 15:03:07 +01:00
add mandatory flags for values
This commit is contained in:
@@ -270,9 +270,12 @@ class PipelineInfo{
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rt.target === undefined && typeof(parent) === 'object' && parent.target !== undefined){
|
||||
if (rt.target === undefined && typeof(parent) === 'object'){
|
||||
rt.target=parent.target;
|
||||
}
|
||||
if (rt.mandatory === undefined && typeof(parent) === 'object'){
|
||||
rt.mandatory=parent.mandatory;
|
||||
}
|
||||
return rt;
|
||||
}
|
||||
const expandList=(lst,parent)=>{
|
||||
@@ -453,7 +456,13 @@ class PipelineInfo{
|
||||
for (let k in configStruct) {
|
||||
let struct = configStruct[k];
|
||||
if (round > 0) config[k] = struct.key;
|
||||
if (struct.target !== undefined && struct.value !== undefined) {
|
||||
if (struct.target !== undefined ) {
|
||||
if (struct.value === undefined){
|
||||
if (struct.mandatory && round > 0){
|
||||
errors+=" missing value for "+k+"\n";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (struct.target === 'environment' ) {
|
||||
if (round > 0) environment = struct.value;
|
||||
else allowedResources=struct.resource;
|
||||
|
||||
Reference in New Issue
Block a user