Skip to content

Commit d8c9146

Browse files
authored
Merge pull request #170 from jomjol/rolling
Update to v6.6.0
2 parents 9862ae8 + 37b2e37 commit d8c9146

File tree

8 files changed

+76
-25
lines changed

8 files changed

+76
-25
lines changed

FeatureRequest.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Feature Requests
22

3-
**There are a lot of ideas for further improvements, but only limited capacity on side of the developer. **Therefore I have created this page as a collection of ideas.
3+
**There are a lot of ideas for further improvements, but only limited capacity on side of the developer.** Therefore I have created this page as a collection of ideas.
44

55
1. Who ever has a new idea can put it here, so it that it is not forgotten.
66

@@ -11,6 +11,20 @@
1111

1212
____
1313

14+
#### #4 Initial Shifting and Rotation
15+
16+
* https://github.com/jomjol/AI-on-the-edge-device/issues/123
17+
18+
Implementation of a shifting additional to the initial rotation of the raw camera input
19+
20+
To do:
21+
22+
* Implementation of shifting
23+
* Extension of configuration
24+
* Adaption of the html configuration to implement shifting
25+
26+
27+
1428
#### #3 Allow grouping of digits to multiple reading values
1529

1630
* https://github.com/jomjol/AI-on-the-edge-device/issues/123
@@ -21,9 +35,6 @@ To do:
2135

2236
* Extend the configuration, setting and processing flow for two independend readouts
2337

24-
25-
####
26-
2738
https://github.com/jomjol/AI-on-the-edge-device/issues/123
2839

2940

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ If you would like to support the developer with a cup of coffee you can do that
3939

4040
**General remark:** Beside the `firmware.bin`, typically also the content of `/html` needs to be updated!
4141

42+
##### 6.6.0 Image Processing in Memory - (2021-03-28)
4243

44+
* Improved SD-card handling (increase compatibility with more type of cards)
4345

4446
##### 6.5.0 Image Processing in Memory - (2021-03-25)
4547

code/main/main.cpp

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
#include "ClassControllCamera.h"
2626
#include "server_main.h"
2727
#include "server_camera.h"
28+
29+
30+
#define __SD_USE_ONE_LINE_MODE__
31+
32+
#ifdef __SD_USE_ONE_LINE_MODE__
2833
#include "server_GPIO.h"
34+
#endif
35+
2936
static const char *TAGMAIN = "connect_wlan_main";
3037

3138
#define FLASH_GPIO GPIO_NUM_4
@@ -37,34 +44,61 @@ void Init_NVS_SDCard()
3744
ESP_ERROR_CHECK(nvs_flash_erase());
3845
ret = nvs_flash_init();
3946
}
47+
////////////////////////////////////////////////
4048

41-
ESP_LOGI(TAGMAIN, "Initializing SD card");
49+
ESP_LOGI(TAG, "Using SDMMC peripheral");
4250
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
43-
host.flags = SDMMC_HOST_FLAG_1BIT;
44-
// sdmmc_host_t host = SDMMC_HOST_SLOT_1();
45-
// host.flags = SDMMC_HOST_FLAG_1BIT;
46-
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
47-
slot_config.width = 1; // 1 line SD mode
48-
49-
esp_vfs_fat_sdmmc_mount_config_t mount_config = { };
50-
mount_config.format_if_mount_failed = false;
51-
mount_config.max_files = 5;
5251

53-
gpio_set_pull_mode((gpio_num_t) 15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1- line modes
54-
gpio_set_pull_mode((gpio_num_t) 2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes
52+
// This initializes the slot without card detect (CD) and write protect (WP) signals.
53+
// Modify slot_config.gpio_cd and slot_config.gpio_wp if your board has these signals.
54+
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
5555

56+
// To use 1-line SD mode, uncomment the following line:
57+
58+
#ifdef __SD_USE_ONE_LINE_MODE__
59+
slot_config.width = 1;
60+
#endif
61+
62+
// GPIOs 15, 2, 4, 12, 13 should have external 10k pull-ups.
63+
// Internal pull-ups are not sufficient. However, enabling internal pull-ups
64+
// does make a difference some boards, so we do that here.
65+
gpio_set_pull_mode(GPIO_NUM_15, GPIO_PULLUP_ONLY); // CMD, needed in 4- and 1- line modes
66+
gpio_set_pull_mode(GPIO_NUM_2, GPIO_PULLUP_ONLY); // D0, needed in 4- and 1-line modes
67+
gpio_set_pull_mode(GPIO_NUM_4, GPIO_PULLUP_ONLY); // D1, needed in 4-line mode only
68+
gpio_set_pull_mode(GPIO_NUM_12, GPIO_PULLUP_ONLY); // D2, needed in 4-line mode only
69+
gpio_set_pull_mode(GPIO_NUM_13, GPIO_PULLUP_ONLY); // D3, needed in 4- and 1-line modes
70+
71+
// Options for mounting the filesystem.
72+
// If format_if_mount_failed is set to true, SD card will be partitioned and
73+
// formatted in case when mounting fails.
74+
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
75+
.format_if_mount_failed = false,
76+
.max_files = 5,
77+
.allocation_unit_size = 16 * 1024
78+
};
79+
80+
// Use settings defined above to initialize SD card and mount FAT filesystem.
81+
// Note: esp_vfs_fat_sdmmc_mount is an all-in-one convenience function.
82+
// Please check its source code and implement error recovery when developing
83+
// production applications.
5684
sdmmc_card_t* card;
5785
ret = esp_vfs_fat_sdmmc_mount("/sdcard", &host, &slot_config, &mount_config, &card);
86+
5887
if (ret != ESP_OK) {
5988
if (ret == ESP_FAIL) {
60-
ESP_LOGE(TAGMAIN, "Failed to mount filesystem. If you want the card to be formatted, set format_if_mount_failed = true.");
89+
ESP_LOGE(TAG, "Failed to mount filesystem. "
90+
"If you want the card to be formatted, set format_if_mount_failed = true.");
6191
} else {
62-
ESP_LOGE(TAGMAIN, "Failed to initialize the card (%d). Make sure SD card lines have pull-up resistors in place.", ret);
92+
ESP_LOGE(TAG, "Failed to initialize the card (%s). "
93+
"Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret));
6394
}
6495
return;
6596
}
97+
98+
// Card has been initialized, print its properties
6699
sdmmc_card_print_info(stdout, card);
67100

101+
68102
// Init the GPIO
69103
// Flash ausschalten
70104
gpio_pad_select_gpio(FLASH_GPIO);
@@ -113,7 +147,11 @@ extern "C" void app_main(void)
113147
register_server_tflite_uri(server);
114148
register_server_file_uri(server, "/sdcard");
115149
register_server_ota_sdcard_uri(server);
150+
151+
#ifdef __SD_USE_ONE_LINE_MODE__
116152
register_server_GPIO_uri(server);
153+
#endif
154+
117155
register_server_main_uri(server, "/sdcard");
118156

119157
TFliteDoAutoStart();

code/main/version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const char* GIT_REV="7bc4e63";
1+
const char* GIT_REV="98dfba0";
22
const char* GIT_TAG="";
3-
const char* GIT_BRANCH="master";
4-
const char* BUILD_TIME="2021-03-25 20:52";
3+
const char* GIT_BRANCH="rolling";
4+
const char* BUILD_TIME="2021-03-28 19:59";

code/main/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern "C"
1313
#include "Helper.h"
1414
#include <fstream>
1515

16-
const char* GIT_BASE_BRANCH = "master - v6.5.0 - 2020-03-25";
16+
const char* GIT_BASE_BRANCH = "master - v6.6.0 - 2020-03-28";
1717

1818

1919
const char* git_base_branch(void)

code/version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const char* GIT_REV="7bc4e63";
1+
const char* GIT_REV="98dfba0";
22
const char* GIT_TAG="";
3-
const char* GIT_BRANCH="master";
4-
const char* BUILD_TIME="2021-03-25 20:52";
3+
const char* GIT_BRANCH="rolling";
4+
const char* BUILD_TIME="2021-03-28 19:59";

firmware/bootloader.bin

0 Bytes
Binary file not shown.

firmware/firmware.bin

-32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)