Skip to content

Commit

Permalink
Merge branch 'next' into sha_fir_random_app
Browse files Browse the repository at this point in the history
  • Loading branch information
zxkmm committed Oct 4, 2024
2 parents d7ef020 + b0c92d9 commit e3facb0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is a fork of the [Havoc](https://github.com/furrtek/portapack-havoc/) firmw

[<img src="https://raw.githubusercontent.com/wiki/portapack-mayhem/mayhem-firmware/img/hw_overview_h2_front.png" height="400">](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview) [<img src="https://raw.githubusercontent.com/wiki/portapack-mayhem/mayhem-firmware/img/hw_overview_h2_inside.png" height="400">](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview#portapack-internals)

*[PortaPack H2+HackRF+battery](https://grabify.link/7T28JP) (clone) with a custom [3d printed case](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure)*
*[PortaPack H2+HackRF+battery](https://grabify.link/ZYYPLB) (clone) with a custom [3d printed case](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure)*

# What is this?

Expand All @@ -27,11 +27,11 @@ This repository expands upon the previous work by many people and aims to consta

## What to buy?

:heavy_check_mark: ![Static Badge](https://img.shields.io/badge/NEW-yellow) The fabulous [PortaPack H4M Mayhem](https://grabify.link/VPMPSL), featuring numerous improvements and accessories. Sold by our friends at OpenSourceSDRLab. Join their giveaways on discord (check the badge on top).
:heavy_check_mark: ![Static Badge](https://img.shields.io/badge/NEW-yellow) The fabulous [PortaPack H4M Mayhem](https://grabify.link/VPMPSL), featuring numerous improvements and accessories. Sold by our friends at [OpenSourceSDRLab](https://grabify.link/99SAMT). Join their giveaways on discord (check the badge on top).

:heavy_check_mark: A recommended one is this [PortaPack H2](https://grabify.link/7T28JP), that includes everything you need with the plastic case "inspired" on [this](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure).
:heavy_check_mark: A recommended one is this [PortaPack H2](https://grabify.link/ZYYPLB), that includes everything you need with the plastic case "inspired" on [this](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure).

:heavy_check_mark: Some individuals lean towards the [H2 with a metal enclosure](https://grabify.link/HTDXG5), but its advantages remain debated. Share your insights on our [wiki](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview).
:heavy_check_mark: Some individuals lean towards the [H2 with a metal enclosure](https://grabify.link/D001O0), but its advantages remain debated. Share your insights on our [wiki](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview).

:warning: Be cautious , *ask* the seller about compatibility with the latest releases. Look out for the description of the item, if they provide the firmware files for an older version or they have custom setup instructions, this means it might be **NOT compatible**, for example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void RandomPasswordView::new_password() {
if (check_auto_send.value() || flooding) {
async_prev_val = portapack::async_tx_enabled;
portapack::async_tx_enabled = true;
// printing out seeds buufer
// printing out seeds buffer
// for (auto seed : seeds_deque) {
// UsbSerialAsyncmsg::asyncmsg(std::to_string(seed));
// }
Expand All @@ -354,18 +354,11 @@ void RandomPasswordView::new_password() {
clean_buffer();
}

// tried:
// 1. paint inline in new_password func
// 2. paint in a seperate func and call from new_password
// 3. override nav's paint func (i think it can tried to capture same obj) and paint, hoping set_dirty handle it correctly
// 4. override nav's paint func (i think it can tried to capture same obj) and paint in a seperate func, hoping set_dirty handle it correctly
// all these methods failed, and all of them only flash and disappeared. only when set_dirty in on_data (which seems incorrect), and it keep flashing never stop. but see painted content (flashing too)
// btw this is not caused by the seed text set thing, cuz commented it out not helping.
void RandomPasswordView::paint_password_hints() {
Painter painter;
const int char_width = 8;
const int char_height = 16;
const int start_y = 7 * char_height + 5;
const int start_y = 6 * char_height;
const int rect_height = 4;

for (size_t i = 0; i < password.length(); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ using namespace ui;

namespace ui::external_app::random_password {

class RandomPasswordLogger { // TODO: log is broken after introduced the buffer thing
class RandomPasswordLogger {
public:
Optional<File::Error> append(const std::filesystem::path& filename) {
return log_file.append(filename);
Expand Down Expand Up @@ -131,7 +131,7 @@ class RandomPasswordView : public View {
"000000000000000000000000000000"};

Text text_char_type_hints{
{0, 5 * 16, screen_width, 16},
{0, 5 * 16 + 4, screen_width, 16},
"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"};

Checkbox check_show_seeds{
Expand Down
2 changes: 2 additions & 0 deletions firmware/common/ui_widget.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ class Widget {
};

class View : public Widget {
// unlike Paint class, our Y ignored the top bar;
// so when you draw some of us as Y = 0, it would be exact below the top bar, instead of overlapped with top bar
public:
View() {
}
Expand Down

0 comments on commit e3facb0

Please sign in to comment.