Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
portapack-mayhem
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mcules
portapack-mayhem
Commits
215ac431
Commit
215ac431
authored
8 years ago
by
furrtek
Browse files
Options
Downloads
Patches
Plain Diff
Fix std::array init
parent
7facccb7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
firmware/application/ui_scanner.hpp
+1
-1
1 addition, 1 deletion
firmware/application/ui_scanner.hpp
firmware/tools/adsb_db.py
+41
-0
41 additions, 0 deletions
firmware/tools/adsb_db.py
firmware/tools/adsb_map.py
+41
-0
41 additions, 0 deletions
firmware/tools/adsb_map.py
with
83 additions
and
1 deletion
firmware/application/ui_scanner.hpp
+
1
−
1
View file @
215ac431
...
@@ -114,7 +114,7 @@ private:
...
@@ -114,7 +114,7 @@ private:
uint32_t
bin_skip_acc
{
0
},
bin_skip_frac
{
};
uint32_t
bin_skip_acc
{
0
},
bin_skip_frac
{
};
uint32_t
pixel_index
{
0
};
uint32_t
pixel_index
{
0
};
std
::
array
<
Color
,
240
>
spectrum_row
{
0
};
std
::
array
<
Color
,
240
>
spectrum_row
=
{
0
};
ChannelSpectrumFIFO
*
fifo
{
nullptr
};
ChannelSpectrumFIFO
*
fifo
{
nullptr
};
rf
::
Frequency
f_min
{
0
},
f_max
{
0
};
rf
::
Frequency
f_min
{
0
},
f_max
{
0
};
uint8_t
detect_timer
{
0
},
release_timer
{
0
},
timing_div
{
0
};
uint8_t
detect_timer
{
0
},
release_timer
{
0
},
timing_div
{
0
};
...
...
This diff is collapsed.
Click to expand it.
firmware/tools/adsb_db.py
0 → 100755
+
41
−
0
View file @
215ac431
#!/usr/bin/env python
# Copyright (C) 2017 Furrtek
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
import
sys
import
struct
outfile
=
open
(
"
airlines.db
"
,
"
w
"
)
lines
=
[
line
.
rstrip
(
'
\n
'
)
for
line
in
open
(
'
../../sdcard/ADSB/airlines.txt
'
,
'
r
'
)]
n
=
0
for
line
in
lines
:
if
line
:
nd
=
line
.
find
(
'
(
'
)
if
(
nd
==
-
1
):
nd
=
None
else
:
nd
-=
1
nline
=
line
[
4
:
7
]
+
'
\0
'
+
line
[
10
:
nd
]
+
'
\0
'
print
nline
b
=
bytearray
(
nline
)
pad_len
=
32
-
len
(
b
)
b
+=
"
\0
"
*
pad_len
outfile
.
write
(
b
)
This diff is collapsed.
Click to expand it.
firmware/tools/adsb_map.py
0 → 100755
+
41
−
0
View file @
215ac431
#!/usr/bin/env python
# Copyright (C) 2017 Furrtek
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
#
import
sys
import
struct
from
PIL
import
Image
outfile
=
open
(
'
../../sdcard/ADSB/world_map.bin
'
,
'
wb
'
)
im
=
Image
.
open
(
"
../../sdcard/ADSB/world_map.jpg
"
)
pix
=
im
.
load
()
outfile
.
write
(
struct
.
pack
(
'
H
'
,
im
.
size
[
0
]))
outfile
.
write
(
struct
.
pack
(
'
H
'
,
im
.
size
[
1
]))
for
y
in
range
(
0
,
im
.
size
[
1
]):
line
=
''
for
x
in
range
(
0
,
im
.
size
[
0
]):
pixel_lcd
=
(
pix
[
x
,
y
][
0
]
>>
3
)
<<
11
pixel_lcd
|=
(
pix
[
x
,
y
][
1
]
>>
2
)
<<
5
pixel_lcd
|=
(
pix
[
x
,
y
][
2
]
>>
3
)
line
+=
struct
.
pack
(
'
H
'
,
pixel_lcd
)
outfile
.
write
(
line
)
print
str
(
y
)
+
'
/
'
+
str
(
im
.
size
[
1
])
+
'
\r
'
,
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment