Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
odb_view
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
saeed
odb_view
Commits
d225b3c4
Commit
d225b3c4
authored
Oct 06, 2019
by
saeed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a bit cleaning
parent
a0195239
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
12 deletions
+3
-12
renderer.c
renderer.c
+1
-10
run_main.c
run_main.c
+2
-2
No files found.
renderer.c
View file @
d225b3c4
...
...
@@ -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
);
}
}
...
...
run_main.c
View file @
d225b3c4
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment