Commit d225b3c4 authored by saeed's avatar saeed

a bit cleaning

parent a0195239
......@@ -159,9 +159,7 @@ static int isinsymbol(int i, int j,float radius, int x, int y){
static void drawonscreen_expose(struct Vis *vis,struct dsp_field *dspf, struct obs_set *obsset, struct screen_dim *scdim){
printf("%d \n",obsset->icur);
printf("%d \n",stn_set.icur);
struct obs *obsp = obsset->obs[obsset->icur];
struct station *stns = stn_set.stns[stn_set.icur];
uint32 pcolor = 0x0;
......@@ -193,7 +191,6 @@ static void drawonscreen_expose(struct Vis *vis,struct dsp_field *dspf, struct o
ximage = XCreateImage(vis->dsp, vis->visual, 24, ZPixmap, 0, dspf->image32, vis->w, vis->h, 32, 0);
XPutImage(vis->dsp, pixmap, vis->gc, ximage, 0, 0, 0, 0, vis->w, vis->h);
XSetForeground(vis->dsp, vis->gc, stn_color);
printf("%d obsp->npy \n",obsp->npy);
for (int i=0; i< obsp->npy;++i){
if (obsp->iindex[i] != -1 && obsp->jindex[i] != -1){
struct Index index = map(obsp->iindex[i], obsp->jindex[i], vis->w, vis->h, NX, NY);
......@@ -485,8 +482,6 @@ static void odbinfo_onotherwindow(struct Vis *vis, struct odbinfo_set *odbinfo_s
static int handle_keyboard(struct Vis *vis, struct Vis *vis1,XEvent *e, struct obs_set *obsp,struct screen_dim *scdim){
printf("handle keyboard \n");
int result = 1;
static int palet = 0;
char buffer[80] = {'\0'};
......@@ -511,7 +506,6 @@ static int handle_keyboard(struct Vis *vis, struct Vis *vis1,XEvent *e, struct o
stn_set.icur++;
obsp->icur++;
odbinfo_set.icur++;
printf("%d up icur \n",stn_set.icur);
if (stn_set.icur >= stn_set.nt) stn_set.icur = 0;
if (obsp->icur >= obsp->nt) obsp->icur = 0;
if (odbinfo_set.icur >= odbinfo_set.nt) odbinfo_set.icur = 0;
......@@ -522,7 +516,6 @@ static int handle_keyboard(struct Vis *vis, struct Vis *vis1,XEvent *e, struct o
stn_set.icur--;
obsp->icur--;
odbinfo_set.icur--;
printf("%d down icur \n",stn_set.icur);
if (stn_set.icur < 0) stn_set.icur = stn_set.nt -1;
if (obsp->icur < 0) obsp->icur = obsp->nt -1;
if (odbinfo_set.icur < 0) odbinfo_set.icur = odbinfo_set.nt -1;
......@@ -551,7 +544,6 @@ static void handle_event(struct Vis *vis,struct Vis *vis1, struct dsp_field *dsp
XFlush(vis->dsp);
done = 1;
printf("here\n");
for(;done;){
......@@ -576,7 +568,6 @@ static void handle_event(struct Vis *vis,struct Vis *vis1, struct dsp_field *dsp
drawonscreen_motion(vis,&obs_set,&e,scdim);
}
if (e.type == KeyPress){
printf("keyboard \n");
done = handle_keyboard(vis,vis1,&e,&obs_set,scdim);
}
}
......
......@@ -33,8 +33,8 @@ static int run_view(int argc,char *argv[]){
obs_set = fill_obs_set(FLD.lon, FLD.lat, NX, NY);
log_stn(&stn_set);
log_odb(&odbinfo_set);
//log_stn(&stn_set);
//log_odb(&odbinfo_set);
struct Vis visu = init_x(width,height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment