show fpga temp in developer tab in gui, virtual servers just show warning if no temperature file in /tmp to read (dont throw exception) (#573)

This commit is contained in:
Dhanya Thattil
2022-11-11 17:15:15 +01:00
committed by GitHub
parent 38cd10d4e6
commit bf3333b97b
2 changed files with 14 additions and 0 deletions

View File

@ -707,6 +707,10 @@ int readADCFromFile(char *fname, int *value) {
// open file
FILE *fd = fopen(fname, "r");
if (fd == NULL) {
#ifdef VIRTUAL
LOG(logWARNING, ("Could not open file for reading [%s]\n", fname));
return OK;
#endif
LOG(logERROR, ("Could not open file for reading [%s]\n", fname));
return FAIL;
}