Skip to content

Commit 46644b6

Browse files
committed
feat(board): remove APOTA
1 parent 9d27dd0 commit 46644b6

File tree

4 files changed

+3
-340
lines changed

4 files changed

+3
-340
lines changed

boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41448,7 +41448,7 @@ sensebox_eye.menu.PartitionScheme.tinyuf2=TinyUF2 Compatibility (2MB APP/12MB FF
4144841448
sensebox_eye.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader_tinyuf2
4144941449
sensebox_eye.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions_tinyuf2
4145041450
sensebox_eye.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152
41451-
sensebox_eye.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" 0x210000 "{runtime.platform.path}/variants/{build.variant}/APOTA.bin"
41451+
sensebox_eye.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
4145241452
sensebox_eye.menu.PartitionScheme.gen4esp32scheme4=Huge App (16MB APP)
4145341453
sensebox_eye.menu.PartitionScheme.gen4esp32scheme4.build.custom_partitions=gen4esp32_16MBapp
4145441454
sensebox_eye.menu.PartitionScheme.gen4esp32scheme4.upload.maximum_size=16646144

variants/sensebox_eye/APOTA.bin

-954 KB
Binary file not shown.

variants/sensebox_eye/APOTA.ino

Lines changed: 0 additions & 287 deletions
This file was deleted.

variants/sensebox_eye/variant.cpp

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
1-
/*
2-
* The MIT License (MIT)
3-
*
4-
* Copyright (c) 2021 Ha Thach (tinyusb.org) for Adafruit Industries
5-
*
6-
* Permission is hereby granted, free of charge, to any person obtaining a copy
7-
* of this software and associated documentation files (the "Software"), to deal
8-
* in the Software without restriction, including without limitation the rights
9-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
* copies of the Software, and to permit persons to whom the Software is
11-
* furnished to do so, subject to the following conditions:
12-
*
13-
* The above copyright notice and this permission notice shall be included in
14-
* all copies or substantial portions of the Software.
15-
*
16-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
* THE SOFTWARE.
23-
*/
24-
251
#include "esp32-hal-gpio.h"
262
#include "pins_arduino.h"
273
#include "driver/rmt_tx.h"
28-
#include "esp_log.h"
29-
#include "esp_partition.h"
30-
#include "esp_system.h"
31-
#include "esp_ota_ops.h"
324

335
extern "C" {
346

@@ -72,29 +44,7 @@ void initVariant(void) {
7244
.loop_count = 0
7345
};
7446

75-
// define button pin
76-
pinMode(47, INPUT_PULLUP);
77-
78-
// Check if button is pressed
79-
if (digitalRead(47) == LOW) {
80-
// When the button is pressed and then released, boot into the OTA1 partition
81-
const esp_partition_t *ota1_partition = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_OTA_1, NULL);
82-
83-
if (ota1_partition) {
84-
esp_err_t err = esp_ota_set_boot_partition(ota1_partition);
85-
if (err == ESP_OK) {
86-
uint8_t pixel[3] = { 0x00, 0x00, 0x10 }; // blue
87-
blinkLED(pixel, led_chan, ws2812_encoder, tx_config);
88-
esp_restart(); // restart, to boot OTA1 partition
89-
} else {
90-
uint8_t pixel[3] = { 0x00, 0x10, 0x00 }; // red
91-
blinkLED(pixel, led_chan, ws2812_encoder, tx_config);
92-
ESP_LOGE("OTA", "Error setting OTA1 partition: %s", esp_err_to_name(err));
93-
}
94-
}
95-
} else {
96-
uint8_t pixel[3] = { 0x10, 0x00, 0x00 }; // green
97-
blinkLED(pixel, led_chan, ws2812_encoder, tx_config);
98-
}
47+
uint8_t pixel[3] = { 0x10, 0x00, 0x00 }; // green
48+
blinkLED(pixel, led_chan, ws2812_encoder, tx_config);
9949
}
10050
}

0 commit comments

Comments
 (0)