Files
AI-on-the-edge-device/code/main/version.h
CaCO3 524d800a0a Update info page (#1420)
* consolidate info page

* use new REST API

* .

* .

* .

* .

* .

* .

* .

* Make sure after the reboot we go to the overview page

* .

* Update server_main.cpp
2022-11-28 18:51:11 +01:00

57 lines
1010 B
C++

#ifndef _VERSION_H
#define _VERSION_H
// These variables are autogenerated and compiled
// into the library by the version.cmake script
extern "C"
{
extern const char* GIT_TAG;
extern const char* GIT_REV;
extern const char* GIT_BRANCH;
extern const char* BUILD_TIME;
}
#include <string>
#include <string.h>
#include "Helper.h"
#include <fstream>
const char* build_time(void)
{
return BUILD_TIME;
}
const char* libfive_git_version(void)
{
return GIT_TAG;
}
const char* libfive_git_revision(void)
{
return GIT_REV;
}
const char* libfive_git_branch(void)
{
return GIT_BRANCH;
}
char _char_getHTMLversion[100]="?\0";
const char* getHTMLversion(void){
FILE* pFile;
string fn = FormatFileName("/sdcard/html/version.txt");
pFile = fopen(fn.c_str(), "r");
if (pFile == NULL)
return _char_getHTMLversion;
fgets(_char_getHTMLversion, sizeof(_char_getHTMLversion), pFile);
fclose(pFile);
return _char_getHTMLversion;
}
#endif // _VERSION_H