Skip to content

Commit

Permalink
Merge pull request #654 from justcallmekoko/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
justcallmekoko authored Feb 5, 2025
2 parents d4c3e22 + c09f9b8 commit cf67f68
Show file tree
Hide file tree
Showing 13 changed files with 175 additions and 83 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -589,84 +589,84 @@ jobs:
find ./esp32_marauder/build -name "*.bin"
- name: 'Upload Flipper Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.flipper.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.flipper.bin
retention-days: 5

- name: 'Upload MultiboardS3 Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.multiboardS3.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s3/esp32_marauder.multiboardS3.bin
retention-days: 5

- name: 'Upload OG Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.og.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.og.bin
retention-days: 5

- name: 'Upload v6 Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.v6.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6.bin
retention-days: 5

- name: 'Upload v6_1 Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.v6_1.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.v6_1.bin
retention-days: 5

- name: 'Upload Kit Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.kit.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.kit.bin
retention-days: 5

- name: 'Upload Mini Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.mini.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.mini.bin
retention-days: 5

- name: 'Upload ESP32 LDDB Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.mini.bin
name: esp32_marauder.esp32_lddb.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.esp32_lddb.bin
retention-days: 5

- name: 'Upload Marauder Dev Board Pro Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.marauder_dev_board_pro.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.marauder_dev_board_pro.bin
retention-days: 5

- name: 'Upload Marauder M5StickC Plus Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.m5stickc_plus.bin
path: ./esp32_marauder/build/esp32.esp32.m5stick-c/esp32_marauder.m5stickc_plus.bin
retention-days: 5

- name: 'Upload Rev Feather Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.rev_feather.bin
path: ./esp32_marauder/build/esp32.esp32.esp32s2/esp32_marauder.rev_feather.bin
retention-days: 5

- name: 'Upload Marauder v7 Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esp32_marauder.marauder_v7.bin
path: ./esp32_marauder/build/esp32.esp32.d32/esp32_marauder.marauder_v7.bin
Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 7 additions & 1 deletion esp32_marauder/Assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ PROGMEM static const unsigned char menu_icons[][66] = {
0xBB, 0x63, 0x38, 0x87, 0x3C, 0x3E, 0xFB, 0x0F, 0x3F, 0xFF, 0x81, 0x3F,
0xFF, 0x3F, 0x38, 0xFF, 0xFF, 0x3C, 0xFF, 0x07, 0x3E, 0xFF, 0xEB, 0x3F,
0xFF, 0xEF, 0x3F, 0xFF, 0xEF, 0x3F, 0xFF, 0xDF, 0x3F, 0xFF, 0xFF, 0x3F,
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}
0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F},
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // BLANK: 36
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
};

/*#ifndef MARAUDER_MINI
Expand Down
10 changes: 9 additions & 1 deletion esp32_marauder/BatteryInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ int8_t BatteryInterface::getBatteryLevel() {


if (this->has_max17048) {
return this->maxlipo.cellPercent();
float percent = this->maxlipo.cellPercent();

// Sometimes we dumb
if (percent >= 100)
return 100;
else if (percent <= 0)
return 0;
else
return percent;
}
}
49 changes: 42 additions & 7 deletions esp32_marauder/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,42 @@ void Display::scrollScreenBuffer(bool down) {
}
#endif

void Display::processAndPrintString(TFT_eSPI& tft, const String& originalString) {
// Define colors
uint16_t text_color = TFT_GREEN; // Default text color
uint16_t background_color = TFT_BLACK; // Default background color

String new_string = originalString;

// Check for color macros at the start of the string
if (new_string.startsWith(RED_KEY)) {
text_color = TFT_RED;
new_string.remove(0, strlen(RED_KEY)); // Remove the macro
} else if (new_string.startsWith(GREEN_KEY)) {
text_color = TFT_GREEN;
new_string.remove(0, strlen(GREEN_KEY)); // Remove the macro
} else if (new_string.startsWith(CYAN_KEY)) {
text_color = TFT_CYAN;
new_string.remove(0, strlen(CYAN_KEY)); // Remove the macro
} else if (new_string.startsWith(WHITE_KEY)) {
text_color = TFT_WHITE;
new_string.remove(0, strlen(WHITE_KEY)); // Remove the macro
} else if (new_string.startsWith(MAGENTA_KEY)) {
text_color = TFT_MAGENTA;
new_string.remove(0, strlen(MAGENTA_KEY)); // Remove the macro
}

// Set text color and print the string
tft.setTextColor(text_color, background_color);
tft.print(new_string);
}

void Display::displayBuffer(bool do_clear)
{
if (this->display_buffer->size() > 0)
{
delay(1);

while (display_buffer->size() > 0)
int print_count = 1;
while ((display_buffer->size() > 0) && (print_count > 0))
{

#ifndef SCREEN_BUFFER
Expand Down Expand Up @@ -318,13 +347,19 @@ void Display::displayBuffer(bool do_clear)

for (int i = 0; i < this->screen_buffer->size(); i++) {
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
for (int x = 0; x < TFT_WIDTH / CHAR_WIDTH; x++)
tft.print(" ");
String spaces = String(' ', TFT_WIDTH / CHAR_WIDTH);
//for (int x = 0; x < TFT_WIDTH / CHAR_WIDTH; x++)
// tft.print(" ");
tft.print(spaces);
tft.setCursor(xPos, (i * 12) + (SCREEN_HEIGHT / 6));
tft.setTextColor(TFT_GREEN, TFT_BLACK);
tft.print(this->screen_buffer->get(i));

this->processAndPrintString(tft, this->screen_buffer->get(i));
//tft.setTextColor(TFT_GREEN, TFT_BLACK);
//tft.print(this->screen_buffer->get(i));
}
#endif

print_count--;
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions esp32_marauder/Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
#define LV_ADD_SSID 14
#define WIFI_ATTACK_BEACON_LIST 15

#define RED_KEY ";red;"
#define GREEN_KEY ";grn;"
#define CYAN_KEY ";cyn;"
#define MAGENTA_KEY ";mgn;"
#define WHITE_KEY ";wht;"

class Display
{
private:
Expand All @@ -58,6 +64,7 @@ class Display
#ifdef SCREEN_BUFFER
void scrollScreenBuffer(bool down = false);
#endif
void processAndPrintString(TFT_eSPI& tft, const String& originalString);

public:
Display();
Expand Down
22 changes: 14 additions & 8 deletions esp32_marauder/MenuFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ void MenuFunctions::buttonNotSelected(uint8_t b, int8_t x) {
#ifdef HAS_FULL_SCREEN
display_obj.tft.setFreeFont(MENU_FONT);
display_obj.key[b].drawButton(false, current_menu->list->get(x).name);
if (current_menu->list->get(x).name != text09)
if ((current_menu->list->get(x).name != text09) && (current_menu->list->get(x).icon != 255))
display_obj.tft.drawXBitmap(0,
KEY_Y + x * (KEY_H + KEY_SPACING_Y) - (ICON_H / 2),
menu_icons[current_menu->list->get(x).icon],
Expand All @@ -599,7 +599,7 @@ void MenuFunctions::buttonSelected(uint8_t b, int8_t x) {
#ifdef HAS_FULL_SCREEN
display_obj.tft.setFreeFont(MENU_FONT);
display_obj.key[b].drawButton(true, current_menu->list->get(x).name);
if (current_menu->list->get(x).name != text09)
if ((current_menu->list->get(x).name != text09) && (current_menu->list->get(x).icon != 255))
display_obj.tft.drawXBitmap(0,
KEY_Y + x * (KEY_H + KEY_SPACING_Y) - (ICON_H / 2),
menu_icons[current_menu->list->get(x).icon],
Expand Down Expand Up @@ -1769,18 +1769,24 @@ void MenuFunctions::RunSetup()
});

// Select APs on Mini
this->addNodes(&wifiGeneralMenu, text_table1[56], TFT_NAVY, NULL, KEYBOARD_ICO, [this](){
this->addNodes(&wifiGeneralMenu, "Select APs", TFT_NAVY, NULL, KEYBOARD_ICO, [this](){
// Add the back button
wifiAPMenu.list->clear();
this->addNodes(&wifiAPMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(wifiAPMenu.parentMenu);
});

// Determine how big the whole menu is going to be
int menu_limit;
if (access_points->size() <= BUTTON_ARRAY_LEN)
menu_limit = access_points->size();
else
menu_limit = BUTTON_ARRAY_LEN;

// Populate the menu with buttons
for (int i = 0; i < menu_limit - 1; i++) {
this->addNodes(&wifiAPMenu, access_points->get(i).essid, TFT_CYAN, NULL, KEYBOARD_ICO, [this, i](){
// This is the menu node
this->addNodes(&wifiAPMenu, access_points->get(i).essid, TFT_CYAN, NULL, 255, [this, i](){
AccessPoint new_ap = access_points->get(i);
new_ap.selected = !access_points->get(i).selected;

Expand Down Expand Up @@ -2630,18 +2636,18 @@ void MenuFunctions::displayCurrentMenu(uint8_t start_index)
#ifdef HAS_FULL_SCREEN
#ifndef HAS_ILI9341
if ((current_menu->list->get(i).selected) || (current_menu->selected == i)) {
display_obj.key[i].drawButton(true, current_menu->list->get(i).name);
display_obj.key[i - start_index].drawButton(true, current_menu->list->get(i).name);
}
else {
display_obj.key[i].drawButton(false, current_menu->list->get(i).name);
display_obj.key[i - start_index].drawButton(false, current_menu->list->get(i).name);
}
#else
display_obj.key[i].drawButton(false, current_menu->list->get(i).name);
#endif

if (current_menu->list->get(i).name != text09)
if ((current_menu->list->get(i).name != text09) && (current_menu->list->get(i).icon != 255))
display_obj.tft.drawXBitmap(0,
KEY_Y + i * (KEY_H + KEY_SPACING_Y) - (ICON_H / 2),
KEY_Y + (i - start_index) * (KEY_H + KEY_SPACING_Y) - (ICON_H / 2),
menu_icons[current_menu->list->get(i).icon],
ICON_W,
ICON_H,
Expand Down
1 change: 1 addition & 0 deletions esp32_marauder/MenuFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ extern Settings settings_obj;
#define GPS_MENU 33
#define DISABLE_TOUCH 34
#define FLIPPER 35
#define BLANK 36

PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p);
PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
Expand Down
Loading

0 comments on commit cf67f68

Please sign in to comment.