style changes, add .clang-format config file
This commit is contained in:
parent
1c8e725282
commit
2fb61c4be3
4 changed files with 56 additions and 42 deletions
12
.clang-format
Normal file
12
.clang-format
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
ColumnLimit: 0
|
||||||
|
FixNamespaceComments: false
|
||||||
|
IndentCaseLabels: false
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentWidth: 4
|
||||||
|
NamespaceIndentation: All
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
* Released under GPL v3, 2021
|
* Released under GPL v3, 2021
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
#include "config.h"
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "config.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#ifdef HELP
|
#ifdef HELP
|
||||||
#include "modules/help/help.h"
|
#include "modules/help/help.h"
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef HELP
|
#ifdef HELP
|
||||||
#ifndef HELP_H
|
#ifndef HELP_H
|
||||||
#include <Arduino.h>
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
void help(String);
|
void help(String);
|
||||||
void help_setup();
|
void help_setup();
|
||||||
const struct Command help_commands[] = {
|
const struct Command help_commands[] = {
|
||||||
{"help", help},
|
{"help", help},
|
||||||
END_COMMAND
|
END_COMMAND};
|
||||||
};
|
|
||||||
#define HELP_H
|
#define HELP_H
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "stage.h"
|
#include "stage.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <limits.h>
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
#include <limits.h>
|
||||||
#ifdef SUPPORT_EEPROM
|
#ifdef SUPPORT_EEPROM
|
||||||
#include <EEPROM.h>
|
#include <EEPROM.h>
|
||||||
#else
|
#else
|
||||||
|
|
@ -164,6 +164,7 @@ void stage_loop()
|
||||||
{
|
{
|
||||||
scaled_t = elapsed_t;
|
scaled_t = elapsed_t;
|
||||||
}
|
}
|
||||||
|
|
||||||
stage_moving = false;
|
stage_moving = false;
|
||||||
EACH_MOTOR
|
EACH_MOTOR
|
||||||
{
|
{
|
||||||
|
|
@ -179,6 +180,7 @@ void stage_loop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stage_moving && notify_on_stop)
|
if (!stage_moving && notify_on_stop)
|
||||||
{
|
{
|
||||||
Serial.println("stopped");
|
Serial.println("stopped");
|
||||||
|
|
@ -206,6 +208,7 @@ void stage_mry(String command)
|
||||||
{
|
{
|
||||||
stage_move_single_axis(1, command);
|
stage_move_single_axis(1, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void stage_mrz(String command)
|
void stage_mrz(String command)
|
||||||
{
|
{
|
||||||
stage_move_single_axis(2, command);
|
stage_move_single_axis(2, command);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue