File tree Expand file tree Collapse file tree 4 files changed +4
-68
lines changed Expand file tree Collapse file tree 4 files changed +4
-68
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- void listDir (fs::FS & fs, const char * dirname, uint8_t levels)
16
- {
17
- Serial.printf (" Listing directory: %s\r\n " , dirname);
18
-
19
- File root = fs.open (dirname);
20
- if (!root) {
21
- Serial.println (" - failed to open directory" );
22
- return ;
23
- }
24
- if (!root.isDirectory ()) {
25
- Serial.println (" - not a directory" );
26
- return ;
27
- }
28
-
29
- File file = root.openNextFile ();
30
- while (file) {
31
- if (file.isDirectory ()) {
32
- Serial.print (" DIR : " );
33
- Serial.println (file.name ());
34
- if (levels) {
35
- listDir (fs, file.name (), levels - 1 );
36
- }
37
- } else {
38
- Serial.print (" FILE: " );
39
- Serial.print (file.name ());
40
- Serial.print (" \t SIZE: " );
41
- Serial.println (file.size ());
42
- }
43
- file = root.openNextFile ();
44
- }
45
- }
46
-
47
15
void mapWrite (void )
48
16
{
49
17
String file_tmp;
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- void straight (int len, int init_speed, int max_sp , int finish_speed)
15
+ void straight (int len, int init_speed, int max_speed , int finish_speed)
16
16
{
17
17
int obj_step;
18
18
19
19
controlInterruptStop ();
20
- g_max_speed = max_sp ;
20
+ g_max_speed = max_speed ;
21
21
g_accel = SEARCH_ACCEL;
22
22
23
23
if (init_speed < MIN_SPEED) {
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- void listDir (fs::FS & fs, const char * dirname, uint8_t levels)
16
- {
17
- Serial.printf (" Listing directory: %s\r\n " , dirname);
18
-
19
- File root = fs.open (dirname);
20
- if (!root) {
21
- Serial.println (" - failed to open directory" );
22
- return ;
23
- }
24
- if (!root.isDirectory ()) {
25
- Serial.println (" - not a directory" );
26
- return ;
27
- }
28
-
29
- File file = root.openNextFile ();
30
- while (file) {
31
- if (file.isDirectory ()) {
32
- Serial.print (" DIR : " );
33
- Serial.println (file.name ());
34
- if (levels) {
35
- listDir (fs, file.name (), levels - 1 );
36
- }
37
- } else {
38
- Serial.print (" FILE: " );
39
- Serial.print (file.name ());
40
- Serial.print (" \t SIZE: " );
41
- Serial.println (file.size ());
42
- }
43
- file = root.openNextFile ();
44
- }
45
- }
46
-
47
15
void mapWrite (void )
48
16
{
49
17
String file_tmp;
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- void straight (int len, int init_speed, int max_sp , int finish_speed)
15
+ void straight (int len, int init_speed, int max_speed , int finish_speed)
16
16
{
17
17
int obj_step;
18
18
19
19
controlInterruptStop ();
20
- g_max_speed = max_sp ;
20
+ g_max_speed = max_speed ;
21
21
g_accel = SEARCH_ACCEL;
22
22
23
23
if (init_speed < MIN_SPEED) {
You can’t perform that action at this time.
0 commit comments