Skip to content

Commit

Permalink
#40: underscore in file name, add type to xdr format
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Apr 12, 2022
1 parent 7d653c4 commit 1f42852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/xdrmappings/GwXDRMappings.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class GwXDRFoundMapping : public GwBoatItemNameProvider{
return String("xdr")+getTransducerName();
};
virtual String getBoatItemFormat(){
return "formatXdr"+type->xdrunit; //TODO: use the type def for the correct format
return "formatXdr:"+type->xdrtype+":"+type->xdrunit;
};
virtual ~GwXDRFoundMapping(){}
};
Expand Down
3 changes: 2 additions & 1 deletion web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ function formatDateForFilename(usePrefix,d){
if (usePrefix){
let fwt=document.querySelector('.status-fwtype');
if (fwt) rt=fwt.textContent;
rt+="_";
}
if (! d) d=new Date();
[d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds()]
Expand Down Expand Up @@ -1417,7 +1418,7 @@ function createDashboardItem(name, def, parent) {
src.setAttribute('id','source_'+name);
let u=fmt?fmt.u:' ';
if (! fmt && def.format && def.format.match(/formatXdr/)){
u=def.format.replace(/formatXdr/,'');
u=def.format.replace(/formatXdr:[^:]*:/,'');
}
addEl('span','unit',footer,u);
return value;
Expand Down

0 comments on commit 1f42852

Please sign in to comment.