Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fachgebiet Raumfahrttechnik
Communication Systems
MobiTUB 3
Commits
dd2f0054
Commit
dd2f0054
authored
Apr 23, 2021
by
weisenbergertub90
Browse files
Display asterisk for non digit and non letter character of callsign.
parent
f03d75b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
gr-mobitub3/lib/Beacon_Body_Decoder_impl.cc
View file @
dd2f0054
...
...
@@ -153,7 +153,13 @@ void Beacon_Body_Decoder_impl::handle_enable_status(pmt::pmt_t msg)
log
.
add_to_log_entry_new_line
(
""
);
log
.
ss
<<
"Received callsign: "
;
for
(
uint8_t
i
=
0
;
i
<
6
;
i
++
)
{
log
.
ss
<<
(
char
)
rx
.
callsign
[
i
];
if
(((((
char
)
rx
.
callsign
[
i
])
>=
0x30
)
&&
(((
char
)
rx
.
callsign
[
i
])
<=
0x3A
))
||
((((
char
)
rx
.
callsign
[
i
])
>=
0x41
)
&&
(((
char
)
rx
.
callsign
[
i
])
<=
0x5A
))
||
((((
char
)
rx
.
callsign
[
i
])
>=
0x60
)
&&
(((
char
)
rx
.
callsign
[
i
])
<=
0x7A
)))
{
log
.
ss
<<
(
char
)
rx
.
callsign
[
i
];
}
else
{
log
.
ss
<<
(
char
)
0x2A
;
}
}
log
.
write_new_log_entry
(
log
.
ss
.
str
());
...
...
gr-mobitub3/lib/Beacon_Header_Decoder_impl.cc
View file @
dd2f0054
...
...
@@ -186,7 +186,13 @@ int Beacon_Header_Decoder_impl::general_work(int noutput_items,
if
(
fr
.
read_callsign
(
in
[
i
]))
{
std
::
cout
<<
"Callsign received: "
;
for
(
uint8_t
i
=
0
;
i
<
6
;
i
++
)
{
std
::
cout
<<
(
char
)
rx
.
callsign
[
i
];
if
(((((
char
)
rx
.
callsign
[
i
])
>=
0x30
)
&&
(((
char
)
rx
.
callsign
[
i
])
<=
0x3A
))
||
((((
char
)
rx
.
callsign
[
i
])
>=
0x41
)
&&
(((
char
)
rx
.
callsign
[
i
])
<=
0x5A
))
||
((((
char
)
rx
.
callsign
[
i
])
>=
0x60
)
&&
(((
char
)
rx
.
callsign
[
i
])
<=
0x7A
)))
{
std
::
cout
<<
(
char
)
rx
.
callsign
[
i
];
}
else
{
std
::
cout
<<
(
char
)
0x2A
;
}
}
std
::
cout
<<
std
::
endl
;
// set next state to short data block
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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