Added clang-format (#623)

* added .clang-format
* added names to travis jobs
removed deprecated travis option
* check github action
* added .gitignore
This commit is contained in:
Leon Kiefer authored and GitHub committed 2020-06-09 16:09:23 -05:00
1 parent 661ef9c55e
commit 10a9d00aaf
59 files changed
+2892 -3640

No files matched your search

+9 -14
View File
@@ -31,18 +31,15 @@ int InputStateGPIOKeyCode = 0x0f; // Set to 3 so that it reads on startup
int lastInputStateGPIOKeyCode = 0x0f;
int lastLatchStateGPIOKeyCode = 0;
void setupGPIOKeyCode()
{
void setupGPIOKeyCode() {
pinMode(GPIOKeyCode_LATCH_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D0_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D1_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D2_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D0_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D1_PIN, INPUT_PULLUP); //
pinMode(GPIOKeyCode_D2_PIN, INPUT_PULLUP); //
//pinMode(GPIOKeyCode_D3_PIN, INPUT_PULLUP); //
}
void MeasureGPIOKeyCode()
{
void MeasureGPIOKeyCode() {
int latch = digitalRead(GPIOKeyCode_LATCH_PIN);
// check to see if you just pressed the button
@@ -52,12 +49,11 @@ void MeasureGPIOKeyCode()
{
// whatever the reading is at, it's been there for longer than the debounce
// delay, so take it as the actual current state:
#if defined(ESP8266) || defined(ESP32)
# if defined(ESP8266) || defined(ESP32)
yield();
#endif
# endif
// if the Input state has changed:
if (latch > 0 && lastLatchStateGPIOKeyCode != latch)
{
if (latch > 0 && lastLatchStateGPIOKeyCode != latch) {
int reading = digitalRead(GPIOKeyCode_D0_PIN) | (digitalRead(GPIOKeyCode_D1_PIN) << 1) | (digitalRead(GPIOKeyCode_D2_PIN) << 2);
//| digitalRead(GPIOKeyCode_D3_PIN) << 3;
@@ -71,8 +67,7 @@ void MeasureGPIOKeyCode()
lastLatchStateGPIOKeyCode = latch;
}
if (latch != lastLatchStateGPIOKeyCode)
{
if (latch != lastLatchStateGPIOKeyCode) {
lastLatchStateGPIOKeyCode = latch;
Log.notice(F("GPIOKeyCode latch %d" CR), latch);
if (latch == 0)