Compare commits

...

35 Commits

Author SHA1 Message Date
Erwin Ried 59088071eb Removing this examples
They do not work all the time because they have timestamps
2020-05-06 22:47:45 +02:00
Erwin Ried c76252b79c Replacing the linear "aproximated" way with a proper one (#14) 2020-05-06 16:28:38 +02:00
Erwin Ried 176579b868 Small cleanup in tools 2020-05-05 12:42:40 +02:00
Erwin Ried 9e5068180b Merge pull request #12 from eried/world-map-mercator
World map mercator
2020-05-02 16:36:47 +02:00
Erwin Ried 07d746feb5 Merge branch 'world-map-mercator' of https://github.com/eried/portapack-havoc into world-map-mercator 2020-05-02 16:27:33 +02:00
Erwin Ried 3e0be7979c Small styling change 2020-05-02 16:27:29 +02:00
Erwin Ried 3947a0bfea Update world_map.jpg
Based on openseamaps + openstreetmaps
2020-05-02 15:59:57 +02:00
Erwin Ried 24f060906e Update ui_geomap.cpp 2020-05-02 15:50:29 +02:00
Erwin Ried b98e87284e Adjust for header 2020-05-02 15:42:54 +02:00
Erwin Ried 6a22fbf7a3 Merge pull request #11 from eried/world_map.py
Update world_map.py
2020-05-02 13:42:08 +02:00
Erwin Ried f4461c4eda For bigger pictures 2020-05-02 13:03:54 +02:00
Erwin Ried 018bbdc190 Mercator projection 2020-05-02 13:01:23 +02:00
Erwin Ried 76de12852e Merge pull request #10 from eried/gps-test-files
GPS sim test files
2020-05-02 12:28:02 +02:00
Erwin Ried 444d4f9ff3 GPS sim test files 2020-05-02 11:58:11 +02:00
Erwin Ried 31a04f47de Update world_map.py 2020-05-02 11:42:36 +02:00
Erwin Ried 484af68693 Merge pull request #8 from eried/dockerfile-nogit
Create dockerfile-nogit
2020-04-25 15:45:51 +02:00
Erwin Ried 855dafb959 Merge branch 'master' into dockerfile-nogit 2020-04-25 15:45:37 +02:00
Erwin Ried ca6cf0326f Create dockerfile-nogit 2020-04-25 15:39:57 +02:00
Erwin Ried 79a87f52ba Merge pull request #7 from eried/dockerfile
Dockerfile
2020-04-25 14:48:41 +02:00
Erwin Ried 81b766aefa Merge branch 'master' into dockerfile 2020-04-25 14:47:31 +02:00
Erwin Ried ec29e20d79 Adding CCACHE 2020-04-25 04:04:38 +02:00
Erwin Ried e2ef291add Create dockerfile-nogit 2020-04-25 03:00:00 +02:00
Erwin Ried efeb4d190a Cleaning more old files 2020-04-24 10:08:19 +02:00
Erwin Ried 58ef23c0cd Deployment will be managed by app.buddy.works now 2020-04-23 23:10:31 +02:00
Erwin Ried 2180d5d0b5 Removing old doc files 2020-04-23 22:50:39 +02:00
Erwin Ried b2edc2735b Github pages for the nightly builds 2020-04-23 22:06:09 +02:00
Erwin Ried 683bf5dfd9 Adding Debug app back 2020-04-21 14:22:09 +02:00
Erwin Ried 78df97b388 Update README.md 2020-04-21 13:03:33 +02:00
Erwin Ried 9a8e653f5e Update README.md 2020-04-21 13:02:44 +02:00
Erwin Ried 7107f1e696 Merge branch 'master' of https://github.com/eried/portapack-havoc 2020-04-21 12:55:37 +02:00
Erwin Ried 8e35492fae H2 photos 2020-04-21 12:55:31 +02:00
Erwin Ried 91f177850d Update README.md 2020-04-21 12:34:15 +02:00
Erwin Ried 9ef3dd7260 Merge pull request #6 from furrtek/master
Update
2020-04-21 11:12:20 +02:00
Erwin Ried 9e5eebae39 Shao credits (#340)
* Update ui_about.hpp

* Small alignment fix
2020-04-21 01:50:31 +02:00
Erwin Ried b0ca4fbe8e Delete portapack-h1-havoc.bin (#341)
Old confusing firmware
2020-04-21 01:49:32 +02:00
33 changed files with 92 additions and 424 deletions
-17
View File
@@ -17,17 +17,6 @@ env:
- ARTEFACT_BASE=$TRAVIS_BUILD_DIR/artefacts/
- ARTEFACT_PATH=$ARTEFACT_BASE/$BUILD_NAME
notifications:
irc:
channels:
- "chat.freenode.net#portapack"
template:
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
- "Change view : %{compare_url}"
- "Build details : %{build_url}"
# TODO: The "build_number.1" in this URL is almost certainly wrong, but correct value not available from Travis?
- "Firmware download : https://jboone.github.io/portapack-havoc-nightly/"
before_install:
- sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa -y
- sudo apt-get update -q
@@ -65,9 +54,3 @@ addons:
- cmake
- dfu-util
deploy:
provider: script
skip-cleanup: true
script: bash $TRAVIS_BUILD_DIR/tools/deploy-nightly.sh
on:
branch: master
+25 -1
View File
@@ -1 +1,25 @@
Unofficial fork of the unofficial HAVOC. Just keeping the latest release files and all features I found around here.
## Fork of the unofficial HAVOC
Keeping the latest release files and all features I found, and possible my own features in the future, around here. Check Releases
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CBPQA4HRRPJQ6&source=url)
I only have this [Portapack H2+HackRF+battery](https://s.click.aliexpress.com/e/_dSMPvNo), so that's the version I'll be using for testing the releases before I post them here. BTW, if you have the same H2 (I know... I know it is a *dirty* clone) you could print my case:
[![Case](docs/images/h2_front.jpg)](https://www.thingiverse.com/thing:4260973)
<details>
<summary>More details about the H2 case</summary>
[STL files](https://www.thingiverse.com/thing:4260973)
</details>
<details>
<summary>Printed magnetic cover for the H2 case</summary>
[![Cover](docs/images/h2_cover.jpg)](https://www.thingiverse.com/thing:4278961)
[STL files](https://www.thingiverse.com/thing:4278961)
</details>
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

-171
View File
@@ -1,171 +0,0 @@
~ Pretty ugly PortaPack H1 (+HAVOC) UI widget documentation ~
by @furrtek - v0.1 - 2017/02/02
Not approved at all by @Sharebrained
The display is 240 x 320 pixels.
A View is basically a rectangular zone on the screen.
Widgets (aka controls, UI elements...) go into Views.
Views can be pushed to/popped from a stack.
The main menu view is at the bottom of the stack and can't be popped.
The title bar view is a special case, it (normally) can't be hidden by pushed Views.
Since the title bar is 16 pixel high, a regular full-screen view is 240 x 304 pixels.
If the current View can be popped (removed), an arrow shows on the left of the title bar.
Kind of widgets:
==== Rectangle ====
A simple filled or outlined rectangle. No interactivity.
Constructors:
- Empty
- Rectangle(Rect, Color)
Methods:
- set_color(Color)
- set_outline(bool): Default is filled, set to true for outline only
==== Text ====
A simple text label. No interactivity.
Constructors:
- Empty
- Text(Rect)
- Text(Rect, std::string)
Methods:
- set(std::string): Updates text
==== BigFrequency (HAVOC) ====
Displays a big 7-segment style frequency value in the XXXX.xxxMHz format.
If the value is 0, ----.--- is displayed. No leading zeros. No interactivity.
Constructors:
- BigFrequency(Rect, rf::Frequency)
Methods:
- set(rf::Frequency): Updates value
==== ProgressBar (HAVOC) ====
Displays progress as an horizontal progress bar with value and maximum value.
No interactivity.
Constructors:
- ProgressBar(Rect)
Methods:
- set_max(uint32_t): Updates maximum value
- set_value(uint32_t): Updates current value
The maximum value is set by default to 100.
==== Console ====
Displays a scrolling text console. No interactivity.
Constructors:
- Console(Rect)
Methods:
- clear(): Clears text and resets cursor to top-left
- write(std::string): Adds text
- writeln(std::string): Adds text and CR + LF
==== Checkbox (HAVOC) ====
A toggle option shown as a tickable box with a text label.
Interactive: select and touch.
Constructors:
- Empty
- Checkbox(Point, size_t, std::string)
- Checkbox(Point, size_t, std::string, bool)
(Position, length of text label, text, regular size/small)
Methods:
- bool value(): Returns state
- set_text(std::string): Updates text label
- set_value(bool): Sets state
Callbacks:
- on_select: Select key press or touch. Returns state
==== Button ====
A momentary push-button. Interactive: select and touch.
Constructors:
- Empty
- Button(Rect, std::string)
Methods:
- std::string text(): Returns text
- set_text(std::string): Updates text
Callbacks:
- on_select: Select key press or touch
- on_dir: Direction keys press
- on_highlight: Focus get
==== Image ====
Shows a 1-bit bitmap. No interactivity.
Constructors:
- Empty
- Image(Rect, Bitmap*, Color, Color)
(Rect, pointer to bitmap (see bitmap.hpp), foreground, background)
Methods:
- set_bitmap(Bitmap*): Updates bitmap
- set_foreground(Color): Changes foreground color
- set_background(Color): Changes background color
- invert_colors(): Flip foreground color with background
==== ImageButton ====
Same as the Image widget, except interactive (select and touch). No methods.
Constructors:
- Empty
- ImageButton(Rect, Bitmap*, Color, Color)
(Rect, pointer to bitmap (see bitmap.hpp), foreground, background)
Callbacks:
- on_select: Select key press or touch
==== ImageOptionsField (HAVOC) ====
Options list displayed as images.
Interactive: change (jog wheel) and focus.
Constructors:
- Empty
- ImageOptionsField(Rect, options_t)
options_t is a std::vector of std::pair of unsigned char pointers to color bitmap data and an int32_t
Methods:
- set_options(options_t)
- size_t selected_index()
- size_t selected_index_value()
- set_selected_index(size_t)
- set_by_value(value_t)
Callbacks:
- on_change: Option was changed
- on_show_options: Focus get
==== OptionsField ====
==== NumberField ====
==== SymField (HAVOC) ====
==== Waveform (HAVOC) ====
+30 -26
View File
@@ -1,27 +1,31 @@
FROM ubuntu:latest
# Set location to download ARM toolkit from.
# This will need to be changed over time or replaced with a static link to the latest release.
ENV ARMBINURL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2?revision=108bd959-44bd-4619-9c19-26187abf5225&la=en&hash=E788CE92E5DFD64B2A8C246BBA91A249CB8E2D2D \
PATH=$PATH:/opt/build/armbin/bin
#Create volume /havoc/bin for compiled firmware binaries
VOLUME /havoc
WORKDIR /havoc/firmware
# Fetch dependencies from APT
RUN apt-get update && \
apt-get install -y git tar wget dfu-util cmake python3 python-pip && \
apt-get -qy autoremove
RUN pip install pyyaml
# Grab the GNU ARM toolchain from arm.com
# Then extract contents to /opt/build/armbin/
RUN mkdir /opt/build && cd /opt/build && \
wget -O gcc-arm-none-eabi $ARMBINURL && \
mkdir armbin && \
tar --strip=1 -xjvf gcc-arm-none-eabi -C armbin
CMD cd .. && cd build && \
FROM ubuntu:xenial
# Set location to download ARM toolkit from.
# This will need to be changed over time or replaced with a static link to the latest release.
ENV ARMBINURL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2?revision=108bd959-44bd-4619-9c19-26187abf5225&la=en&hash=E788CE92E5DFD64B2A8C246BBA91A249CB8E2D2D \
PATH=$HOME/bin:$PATH:/opt/build/armbin/bin
#Create volume /havoc/bin for compiled firmware binaries
VOLUME /havoc
WORKDIR /havoc/firmware
# Fetch dependencies from APT
RUN apt-get update && \
apt-get install -y git tar wget dfu-util cmake python3 python-pip ccache && \
apt-get -qy autoremove
RUN pip install pyyaml
# Grab the GNU ARM toolchain from arm.com
# Then extract contents to /opt/build/armbin/
RUN mkdir /opt/build && cd /opt/build && \
wget -O gcc-arm-none-eabi $ARMBINURL && \
mkdir armbin && \
tar --strip=1 -xjvf gcc-arm-none-eabi -C armbin
# Configure CCACHE
RUN mkdir ~/bin && cd ~/bin && \
for tool in gcc g++ cpp c++;do ln -s $(which ccache) arm-none-eabi-$tool;done
CMD cd .. && cd build && \
cmake .. && make firmware
+1
View File
@@ -0,0 +1 @@
portapack.ried.cl
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

+4
View File
@@ -0,0 +1,4 @@
<h1>Portapack Havoc</h1>
<h2>Nightly builds</h2>
<p><a href="/fake.bin">fake.bin</a></p>
<p><a href="/fake.bin">fake.bin</a></p>
+2 -2
View File
@@ -223,7 +223,7 @@ set(CPPSRC
apps/ui_aprs_tx.cpp
apps/ui_bht_tx.cpp
apps/ui_coasterp.cpp
# apps/ui_debug.cpp
apps/ui_debug.cpp
apps/ui_encoders.cpp
apps/ui_fileman.cpp
apps/ui_freqman.cpp
@@ -276,7 +276,7 @@ set(CPPSRC
# ui_numbers.cpp
# ui_replay_view.cpp
# ui_script.cpp
# ui_sd_card_debug.cpp
ui_sd_card_debug.cpp
${CPLD_20150901_DATA_CPP}
${CPLD_20170522_DATA_CPP}
${HACKRF_CPLD_DATA_CPP}
+2 -2
View File
@@ -28,7 +28,7 @@
#include "audio.hpp"
// #include "ui_sd_card_debug.hpp"
#include "ui_sd_card_debug.hpp"
#include "portapack.hpp"
using namespace portapack;
@@ -347,7 +347,7 @@ DebugMenuView::DebugMenuView(NavigationView& nav) {
add_items({
{ "Memory", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugMemoryView>(); } },
{ "Radio State", ui::Color::white(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
//{ "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push<SDCardDebugView>(); } },
{ "SD Card", ui::Color::white(), nullptr, [&nav](){ nav.push<SDCardDebugView>(); } },
{ "Peripherals", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugPeripheralsMenuView>(); } },
{ "Temperature", ui::Color::white(), nullptr, [&nav](){ nav.push<TemperatureView>(); } },
{ "Controls", ui::Color::white(), nullptr, [&nav](){ nav.push<DebugControlsView>(); } }, });
+15 -8
View File
@@ -30,6 +30,7 @@
using namespace portapack;
#include "string_format.hpp"
#include "complex.hpp"
namespace ui {
@@ -147,7 +148,7 @@ GeoMap::GeoMap(
}
void GeoMap::paint(Painter& painter) {
Coord line;
u_int16_t line;
std::array<ui::Color, 240> map_line_buffer;
const auto r = screen_rect();
@@ -168,7 +169,7 @@ void GeoMap::paint(Painter& painter) {
display.fill_rectangle({ r.center() - Point(16, 1), { 32, 2 } }, Color::red());
display.fill_rectangle({ r.center() - Point(1, 16), { 2, 32 } }, Color::red());
} else {
draw_bearing({ 120, 32 + 144 }, angle_, 16, Color::red());
draw_bearing({ 120, 32 + 144 }, angle_, 10, Color::red());
painter.draw_string({ 120 - ((int)tag_.length() * 8 / 2), 32 + 144 - 32 }, style(), tag_);
}
}
@@ -191,10 +192,16 @@ void GeoMap::move(const float lon, const float lat) {
Rect map_rect = screen_rect();
// Map is in Equidistant "Plate Carrée" projection
x_pos = map_center_x - (map_rect.width() / 2) + (lon_ / lon_ratio);
y_pos = map_center_y - (map_rect.height() / 2) + (lat_ / lat_ratio) + 16;
// Using WGS 84/Pseudo-Mercator projection
x_pos = map_width * (lon_+180)/360 - (map_rect.width() / 2);
// Latitude calculation based on https://stackoverflow.com/a/10401734/2278659
double map_bottom = sin(-85.05 * pi / 180); // Map bitmap only goes from about -85 to 85 lat
double lat_rad = sin(lat * pi / 180);
double map_world_lon = map_width / (2 * pi);
double map_offset = (map_world_lon / 2 * log((1 + map_bottom) / (1 - map_bottom)));
y_pos = map_height - ((map_world_lon / 2 * log((1 + lat_rad) / (1 - lat_rad))) - map_offset) - 128; // Offset added for the GUI
// Cap position
if (x_pos > (map_width - map_rect.width()))
x_pos = map_width - map_rect.width();
@@ -228,8 +235,8 @@ void GeoMap::draw_bearing(const Point origin, const uint32_t angle, uint32_t siz
for (size_t thickness = 0; thickness < 3; thickness++) {
arrow_a = polar_to_point(angle, size) + origin;
arrow_b = polar_to_point(angle + 180 - 30, size) + origin;
arrow_c = polar_to_point(angle + 180 + 30, size) + origin;
arrow_b = polar_to_point(angle + 180 - 35, size) + origin;
arrow_c = polar_to_point(angle + 180 + 35, size) + origin;
display.draw_line(arrow_a, arrow_b, color);
display.draw_line(arrow_b, arrow_c, color);
+2 -2
View File
@@ -39,7 +39,7 @@
#include "ui_aprs_tx.hpp"
#include "ui_bht_tx.hpp"
#include "ui_coasterp.hpp"
//#include "ui_debug.hpp"
#include "ui_debug.hpp"
#include "ui_encoders.hpp"
#include "ui_fileman.hpp"
#include "ui_freqman.hpp"
@@ -438,7 +438,7 @@ SystemMenuView::SystemMenuView(NavigationView& nav) {
{ "Scanner", ui::Color::orange(), &bitmap_icon_scanner, [&nav](){ nav.push<ScannerView>(); } },
{ "Utilities", ui::Color::light_grey(), &bitmap_icon_utilities, [&nav](){ nav.push<UtilitiesMenuView>(); } },
{ "Settings", ui::Color::cyan(), &bitmap_icon_setup, [&nav](){ nav.push<SettingsMenuView>(); } },
//{ "Debug", ui::Color::cyan(), nullptr, [&nav](){ nav.push<DebugMenuView>(); } },
{ "Debug", ui::Color::cyan(), nullptr, [&nav](){ nav.push<DebugMenuView>(); } },
{ "HackRF", ui::Color::cyan(), &bitmap_icon_hackrf, [this, &nav](){ hackrf_mode(nav); } },
{ "About", ui::Color::cyan(), nullptr, [&nav](){ nav.push<AboutView>(); } }
});
Binary file not shown.
+1
View File
@@ -23,6 +23,7 @@ import struct
outfile = open("airlines.db", "w")
# Download airlines.txt from http://xdeco.org/?page_id=30
lines = [line.rstrip('\n') for line in open('../../sdcard/ADSB/airlines.txt', 'r')]
n = 0
+10 -4
View File
@@ -23,11 +23,11 @@ import sys
import struct
from PIL import Image
outfile = open('../../sdcard/world_map.bin', 'wb')
# Allow for bigger images
Image.MAX_IMAGE_PIXELS = None
outfile = open('../../sdcard/ADSB/world_map.bin', 'wb')
im = Image.open("../../sdcard/ADSB/world_map.jpg")
im = Image.open("../../sdcard/world_map.jpg")
pix = im.load()
outfile.write(struct.pack('H', im.size[0]))
@@ -36,9 +36,15 @@ 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]):
# RRRRRGGGGGGBBBBB
pixel_lcd = (pix[x, y][0] >> 3) << 11
pixel_lcd |= (pix[x, y][1] >> 2) << 5
pixel_lcd |= (pix[x, y][2] >> 3)
# RRRGGGBB to
# RRR00GGG000BB000
# pixel_lcd = (pix[x, y][0] >> 5) << 5
# pixel_lcd |= (pix[x, y][1] >> 5) << 2
# pixel_lcd |= (pix[x, y][2] >> 6)
line += struct.pack('H', pixel_lcd)
outfile.write(line)
print(str(y) + '/' + str(im.size[1]) + '\r', end="")
-48
View File
@@ -1,48 +0,0 @@
#!/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.
#
from __future__ import print_function
import sys
import struct
from PIL import Image
outfile = open('../../sdcard/world_map.bin', 'wb')
im = Image.open("../../sdcard/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]):
# RRRRRGGGGGGBBBBB
#pixel_lcd = (pix[x, y][0] >> 3) << 11
#pixel_lcd |= (pix[x, y][1] >> 2) << 5
#pixel_lcd |= (pix[x, y][2] >> 3)
# RRRGGGBB to
# RRR00GGG000BB000
pixel_lcd = (pix[x, y][0] >> 5) << 5
pixel_lcd |= (pix[x, y][1] >> 5) << 2
pixel_lcd |= (pix[x, y][2] >> 6)
line += struct.pack('B', pixel_lcd)
outfile.write(line)
print(str(y) + '/' + str(im.size[1]) + '\r', end="")
-43
View File
@@ -1,43 +0,0 @@
#!/bin/sh
printf "Hold down the HackRF's DFU button (the button closest to the antenna jack)\n"
printf "then plug the HackRF into a USB port on your computer.\n\n"
printf "After the HackRF is plugged in, you may release the DFU button.\n"
printf "Press any key to continue or ^c to abort\n"
read
for i in /usr/share/hackrf/hackrf_one_usb.dfu /usr/share/hackrf/hackrf_one_usb_ram.dfu hackrf_one_usb.dfu; do
if [ -r "${i}" ]; then
ram_firmware="${i}"
break
fi
done
if [ -n "${ram_firmware}" ]; then
printf "\nFound firmware: ${ram_firmware}\n"
printf "Flashing...\n"
else
printf "Unable to find firmware to flash, please have hackrf_one_usb.dfu\n"
printf "in current directory or /usr/share/hackrf/\n"
exit 1
fi
for i in /usr/share/hackrf/hackrf_one_usb.bin /usr/share/hackrf/hackrf_one_usb_rom_to_ram.bin hackrf_one_usb.bin; do
if [ -r "${i}" ]; then
rom_firmware="${i}"
break
fi
done
if [ -n "${rom_firmware}" ]; then
printf "\nFound firmware: ${rom_firmware}\n"
printf "Flashing...\n"
else
printf "Unable to find firmware to flash, please have hackrf_one_usb.bin\n"
printf "in current directory or /usr/share/hackrf/\n"
exit 1
fi
dfu-util --device 1fc9:000c --download "${ram_firmware}" --reset
sleep 2s
hackrf_spiflash -w "${rom_firmware}"
-43
View File
@@ -1,43 +0,0 @@
#!/bin/sh
printf "Hold down the HackRF's DFU button (the button closest to the antenna jack)\n"
printf "then plug the HackRF into a USB port on your computer.\n\n"
printf "After the HackRF is plugged in, you may release the DFU button.\n"
printf "Press any key to continue or ^c to abort\n"
read
for i in /usr/share/hackrf/hackrf_one_usb.dfu /usr/share/hackrf/hackrf_one_usb_ram.dfu hackrf_one_usb.dfu; do
if [ -r "${i}" ]; then
ram_firmware="${i}"
break
fi
done
if [ -n "${ram_firmware}" ]; then
printf "\nFound firmware: ${ram_firmware}\n"
printf "Flashing...\n"
else
printf "Unable to find firmware to flash, please have hackrf_one_usb.dfu\n"
printf "in current directory or /usr/share/hackrf/\n"
exit 1
fi
for i in /usr/share/hackrf/portapack-h1-firmware.bin portapack-h1-firmware.bin; do
if [ -r "${i}" ]; then
rom_firmware="${i}"
break
fi
done
if [ -n "${rom_firmware}" ]; then
printf "\nFound firmware: ${rom_firmware}\n"
printf "Flashing...\n"
else
printf "Unable to find firmware to flash, please have portapack-h1-firmware.bin\n"
printf "in current directory or /usr/share/hackrf/\n"
exit 1
fi
dfu-util --device 1fc9:000c --download "${ram_firmware}" --reset
sleep 2s
hackrf_spiflash -w "${rom_firmware}"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 MiB

After

Width:  |  Height:  |  Size: 90 MiB

-57
View File
@@ -1,57 +0,0 @@
#!/bin/bash
PUBLICATION_BRANCH=master
# set -x
cd $HOME
# Checkout the branch
git clone --branch=$PUBLICATION_BRANCH https://${GITHUB_TOKEN}@github.com/${ARTEFACT_REPO}.git publish
cd publish
# Update pages
BUILD_PATH=$BUILD_DATE-$SHORT_COMMIT_HASH
mkdir $BUILD_PATH
cp $ARTEFACT_BASE/$BUILD_NAME.tar.xz $BUILD_PATH/
cp $ARTEFACT_BASE/MD5SUMS $BUILD_PATH/
cp $ARTEFACT_BASE/SHA256SUMS $BUILD_PATH/
# Write index page
cd $TRAVIS_BUILD_DIR
COMMITS=`git log --oneline | awk '{print $1}'`
cd $HOME/publish
echo "
<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html><head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">
<title>$PROJECT_NAME Builds</title>
</head>
<body>
<h2>$PROJECT_NAME Builds</h2>
<table>
" > index.html
for commit in $COMMITS; do
FILEPATH=`find . -maxdepth 2 -name "*-$commit.tar.xz"`
if [ "$FILEPATH" != "" ]; then
FILEDIR=`dirname "${FILEPATH}"`
FILENAME=`basename "${FILEPATH}"`
FILEPATH=${FILEPATH:2}
# pushd "${FILEDIR}"
# HASH_MD5=`md5sum --binary ${FILENAME}`
# HASH_SHA256=`sha256sum --binary ${FILENAME}`
# popd
echo "<tr><td><a href=\"$FILEPATH\">$FILENAME</a></td><td><a href=\"$FILEDIR/MD5SUMS\">MD5SUMS</a></td><td><a href=\"$FILEDIR/SHA256SUMS\">SHA256SUMS</a></td></tr>" >> index.html
fi
done
echo "
</table>
</body></html>
" >> index.html
# Commit and push latest version
git add $BUILD_PATH/$BUILD_NAME.tar.xz $BUILD_PATH/MD5SUMS $BUILD_PATH/SHA256SUMS index.html
git config user.name "Travis"
git config user.email "travis@travis-ci.org"
git commit -m "Build products for $SHORT_COMMIT_HASH, built on $TRAVIS_OS_NAME, log: $TRAVIS_BUILD_WEB_URL"
if [ "$?" != "0" ]; then
echo "Looks like the commit failed"
fi
git push -fq origin $PUBLICATION_BRANCH