Skip to content
Snippets Groups Projects

Change module to ignore files with one line

Merged Gabriel Fedel requested to merge oneline into master
2 files
+ 24
4
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -44,8 +44,8 @@ int scaling::loadScalingArray(const char* fileName){
status = csv.load(fileName);
if (!status || csv.getCol() != 2)
// CSV file must have 2 columns and > 1 rows
if (!status || csv.getCol() != 2 || csv.getRow() < 2)
return 0;
_scalingArray = csv.getValues();
@@ -122,8 +122,9 @@ asynStatus scaling::writeOctet(asynUser *pasynUser, const char *value,
status_csv = loadScalingArray(value);
if (!status_csv) {
//TODO: Improve this
printf("%s:%s: Fail to load CSV file\n", driverName, functionName);
epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize,
"- Invalid CSV file - %s:%s: status=%d, function=%d, name=%s, value=%s",
driverName, functionName, status_csv, function, paramName, value);
return asynError;
}
Loading