refractor1
This commit is contained in:
parent
c995e1f0c0
commit
a194c58812
|
@ -36,17 +36,24 @@ INSTALL_PREFIX = /usr/local/
|
||||||
CREATE_DIR = /usr/local/share/
|
CREATE_DIR = /usr/local/share/
|
||||||
DESKTOP_DIR = /usr/share/applications
|
DESKTOP_DIR = /usr/share/applications
|
||||||
|
|
||||||
FILE1 = iPDC.xml
|
FILE1 = iPDC.ui
|
||||||
FILE2 = ipdcLogo.png
|
FILE2 = ipdcLogo.png
|
||||||
FILE3 = PSLab.PNG
|
FILE3 = PSLab.PNG
|
||||||
FILE4 = ipdcLogo1.png
|
FILE4 = ipdcLogo1.png
|
||||||
FILE5 = logo.png
|
FILE5 = logo.png
|
||||||
FILE6 = iPDC.desktop
|
FILE6 = iPDC.desktop
|
||||||
|
FILE7 = utility_tools.ui
|
||||||
|
FILE8 = red.png
|
||||||
|
FILE9 = green.png
|
||||||
|
FILE11 = blue.png
|
||||||
|
FILE13 = grey.png
|
||||||
|
|
||||||
|
SOLIB = lib
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LIBS = -lpthread
|
LIBS = -lpthread
|
||||||
LDLIBS=`pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8` lib/liblivechart.so lib/liblivechart_static.a -Wl,--rpath=./lib
|
LDLIBS=`pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8` lib/liblivechart.so lib/liblivechart_static.a -Wl,--rpath=$(CREATE_DIR)iPDC/$(SOLIB)
|
||||||
CFLAGS=-g -I./inc -I./lib -fcommon `pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8`
|
CFLAGS=-g -I./inc -I./lib -fcommon `pkg-config --cflags --libs gtk+-3.0 osmgpsmap-1.0 gee-0.8`
|
||||||
|
|
||||||
PROGRAM = iPDC
|
PROGRAM = iPDC
|
||||||
|
@ -71,7 +78,13 @@ install: $(PROGRAM)
|
||||||
cp -f assets/$(FILE3) $(CREATE_DIR)iPDC/$(FILE3)
|
cp -f assets/$(FILE3) $(CREATE_DIR)iPDC/$(FILE3)
|
||||||
cp -f assets/$(FILE4) $(CREATE_DIR)iPDC/$(FILE4)
|
cp -f assets/$(FILE4) $(CREATE_DIR)iPDC/$(FILE4)
|
||||||
cp -f assets/$(FILE5) $(CREATE_DIR)iPDC/$(FILE5)
|
cp -f assets/$(FILE5) $(CREATE_DIR)iPDC/$(FILE5)
|
||||||
|
cp -f assets/$(FILE7) $(CREATE_DIR)iPDC/$(FILE7)
|
||||||
|
cp -f assets/$(FILE8) $(CREATE_DIR)iPDC/$(FILE8)
|
||||||
|
cp -f assets/$(FILE9) $(CREATE_DIR)iPDC/$(FILE9)
|
||||||
|
cp -f assets/$(FILE11) $(CREATE_DIR)iPDC/$(FILE11)
|
||||||
|
cp -f assets/$(FILE13) $(CREATE_DIR)iPDC/$(FILE13)
|
||||||
cp -f assets/$(FILE6) $(DESKTOP_DIR)/$(FILE6)
|
cp -f assets/$(FILE6) $(DESKTOP_DIR)/$(FILE6)
|
||||||
|
cp -r -f lib/ $(CREATE_DIR)iPDC/$(SOLIB)
|
||||||
cp $(PROGRAM) $(INSTALL_PREFIX)bin/$(PROGRAM)
|
cp $(PROGRAM) $(INSTALL_PREFIX)bin/$(PROGRAM)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|
|
@ -50,8 +50,7 @@
|
||||||
#include "utility_tools.h"
|
#include "utility_tools.h"
|
||||||
|
|
||||||
/* Common fixed path for storage of few common files */
|
/* Common fixed path for storage of few common files */
|
||||||
#define UI_fILE "./assets/iPDC.ui"
|
#define UI_fILE "/usr/local/share/iPDC/iPDC.ui"
|
||||||
//#define UI_fILE "/usr/local/share/iPDC/iPDC.xml"
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
|
@ -73,15 +73,12 @@ gboolean update_images(gpointer* pars){
|
||||||
strncpy(last2bytes, df->dpmu[i]->phasors[0]+2, 2);
|
strncpy(last2bytes, df->dpmu[i]->phasors[0]+2, 2);
|
||||||
vol_magnitude = to_intconvertor(first2bytes);
|
vol_magnitude = to_intconvertor(first2bytes);
|
||||||
float imaginary = to_intconvertor(last2bytes);
|
float imaginary = to_intconvertor(last2bytes);
|
||||||
// printf("vol = %f imag = %f\n",vol_magnitude, imaginary);
|
|
||||||
|
|
||||||
vis_ptr = vis_data_head;
|
vis_ptr = vis_data_head;
|
||||||
match = 0;
|
match = 0;
|
||||||
while(vis_ptr != NULL){
|
while(vis_ptr != NULL){
|
||||||
// printf("vis_ptr->id = %d\n",vis_ptr->id);
|
|
||||||
if(vis_ptr->id == id){
|
if(vis_ptr->id == id){
|
||||||
match = 1;
|
match = 1;
|
||||||
// printf("Matched - id : %d\n",id);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
vis_ptr = vis_ptr->next;
|
vis_ptr = vis_ptr->next;
|
||||||
|
@ -95,7 +92,6 @@ gboolean update_images(gpointer* pars){
|
||||||
live_chart_serie_add(vis_ptr->serie_dfreq, dfreq);
|
live_chart_serie_add(vis_ptr->serie_dfreq, dfreq);
|
||||||
|
|
||||||
if(match == 1 && cfg_match == 1){
|
if(match == 1 && cfg_match == 1){
|
||||||
// printf("lat = %f, lon = %f, freq = %f\n",lat,lon,freq);
|
|
||||||
if(vis_ptr->last_image != 0){
|
if(vis_ptr->last_image != 0){
|
||||||
osm_gps_map_image_remove(parameters->util_map, vis_ptr->last_image);
|
osm_gps_map_image_remove(parameters->util_map, vis_ptr->last_image);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +169,6 @@ gboolean update_images(gpointer* pars){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
df = df->dnext;
|
df = df->dnext;
|
||||||
// i++;
|
|
||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&mutex_on_TSB);
|
pthread_mutex_unlock(&mutex_on_TSB);
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
#include "connections.h"
|
#include "connections.h"
|
||||||
|
|
||||||
// TODO: change this when in production
|
// TODO: change this when in production
|
||||||
#define UI_fILE "./assets/utility_tools.ui"
|
#define UI_fILE "/usr/local/share/iPDC/utility_tools.ui"
|
||||||
#define RED_IMAGE "./assets/red.png"
|
#define RED_IMAGE "/usr/local/share/iPDC/red.png"
|
||||||
#define GREEN_IMAGE "./assets/green.png"
|
#define GREEN_IMAGE "/usr/local/share/iPDC/green.png"
|
||||||
#define YELLOW_IMAGE "./assets/yellow.png"
|
#define BLUE_IMAGE "/usr/local/share/iPDC/blue.png"
|
||||||
#define BLUE_IMAGE "./assets/blue.png"
|
#define GREY_IMAGE "/usr/local/share/iPDC/grey.png"
|
||||||
#define GREY_IMAGE "./assets/grey.png"
|
#define PINK_IMAGE "/usr/local/share/iPDC/pink.png"
|
||||||
#define PINK_IMAGE "./assets/pink.png"
|
|
||||||
|
|
||||||
|
|
||||||
GdkRGBA getIndexColor(int index){
|
GdkRGBA getIndexColor(int index){
|
||||||
|
|
Loading…
Reference in New Issue