Compare commits

...

2 Commits

Author SHA1 Message Date
U-INFINEON\jahnst 539bf8b726 Avoid name clash with some GetObject() windows definition
3 years ago
U-INFINEON\jahnst 10351217c4 Added build system for Windows msys2
3 years ago

@ -60,6 +60,7 @@ help:
echo "set up configuration" echo "set up configuration"
echo " make configlinux to generate the linix build" echo " make configlinux to generate the linix build"
echo " make configcross to generate the windows build using cross tools." echo " make configcross to generate the windows build using cross tools."
echo " make configwindows to generate the windows build using msys2."
echo " " echo " "
echo " make checkdumpfile to create a test tool for videodumps." echo " make checkdumpfile to create a test tool for videodumps."

@ -0,0 +1,12 @@
include Makefile.config
TARGET = $(APP).exe
CPP = g++
CPPFLAGS = -ggdb -Wall -O0 `pkg-config --cflags gtk+-3.0 gmodule-export-2.0` -Wl,--export-dynamic -DBUILD_WINDOWS=1 -Wdeprecated
INCLUDES =
LDFLAGS = -lws2_32 -ljpeg
LIBS = `pkg-config --libs gtk+-3.0 gmodule-export-2.0` -L/usr/lib -mwindows
OBJECTS := $(OBJECTS) windows.oo

@ -222,7 +222,7 @@ void Configuration::LoadConfig(std::string filename) {
posctl.LockMutex(); posctl.LockMutex();
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (jp.GetObject("posctl_axis"+to_string(i), &jaxis)) { if (jp.GetObjectJson("posctl_axis"+to_string(i), &jaxis)) {
jaxis.GetValueDouble("min", &amin); jaxis.GetValueDouble("min", &amin);
jaxis.GetValueDouble("max", &amax); jaxis.GetValueDouble("max", &amax);
jaxis.GetValueDouble("kp", &akp); jaxis.GetValueDouble("kp", &akp);

@ -232,7 +232,7 @@ int JSONParse::GetValueInt64(string varname, int64_t *dest) {
}; };
int JSONParse::GetObject(string varname, JSONParse *dest) { int JSONParse::GetObjectJson(string varname, JSONParse *dest) {
list<JSONElement>::iterator iter; list<JSONElement>::iterator iter;
if (dest == NULL) return 0; if (dest == NULL) return 0;

@ -56,7 +56,7 @@ public:
int GetValueInt(string varname, int *dest); int GetValueInt(string varname, int *dest);
int GetValueDouble(string varname, double *dest); int GetValueDouble(string varname, double *dest);
int GetValueInt64(string varname, int64_t *dest); int GetValueInt64(string varname, int64_t *dest);
int GetObject(string varname, JSONParse *dest); int GetObjectJson(string varname, JSONParse *dest);
int GetIdx(string src, int idx, string *dest); int GetIdx(string src, int idx, string *dest);
int GetValueIdx(string varname, int idx, string *dest); int GetValueIdx(string varname, int idx, string *dest);

Loading…
Cancel
Save