From d86525473ad7b434979ebe737fd0625ef33b09b3 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 19 Feb 2024 12:10:42 +0100 Subject: [PATCH] code beautifying --- .clang-format | 2 +- src/keyer.h | 20 ++++++++++---------- src/settings.h | 8 ++++---- src/sidetone.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.clang-format b/.clang-format index 60bdbb1..e12d309 100644 --- a/.clang-format +++ b/.clang-format @@ -186,7 +186,7 @@ SpaceAfterTemplateKeyword: true SpaceAroundPointerQualifiers: Default SpaceBeforeAssignmentOperators: true SpaceBeforeCaseColon: false -SpaceBeforeCpp11BracedList: false +SpaceBeforeCpp11BracedList: true SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeJsonColon: false diff --git a/src/keyer.h b/src/keyer.h index d74563f..044f916 100644 --- a/src/keyer.h +++ b/src/keyer.h @@ -25,19 +25,19 @@ class Keyer final Abort, }; - uint8_t m_wpm{18}; - Mode m_mode{Mode::IAMBIC_B}; + uint8_t m_wpm {18}; + Mode m_mode {Mode::IAMBIC_B}; - absolute_time_t m_keying_until{0}; - absolute_time_t m_pausing_until{0}; + absolute_time_t m_keying_until {0}; + absolute_time_t m_pausing_until {0}; Sidetone m_buzzer; Sidetone m_audioOut; - State m_state{State::Wait}; - State m_previousState{State::Wait}; - uint64_t m_elementDuration{0}; - bool m_currentlyKeying{false}; - bool m_currentlyPausing{false}; - bool m_keyNextIambicB{false}; + State m_state {State::Wait}; + State m_previousState {State::Wait}; + uint64_t m_elementDuration {0}; + bool m_currentlyKeying {false}; + bool m_currentlyPausing {false}; + bool m_keyNextIambicB {false}; }; \ No newline at end of file diff --git a/src/settings.h b/src/settings.h index ee40631..b240c2b 100644 --- a/src/settings.h +++ b/src/settings.h @@ -10,10 +10,10 @@ enum class Mode : uint8_t { }; struct Settings { - uint16_t magic_number{MAGIC_NUMBER}; // Bytes: 2 - Mode mode{Mode::IAMBIC_B}; // Bytes: 1 - uint8_t wpm{18}; // Bytes: 1 - uint8_t dummy[FLASH_PAGE_SIZE - 4]{0}; // Sum : 4 + uint16_t magic_number {MAGIC_NUMBER}; // Bytes: 2 + Mode mode {Mode::IAMBIC_B}; // Bytes: 1 + uint8_t wpm {18}; // Bytes: 1 + uint8_t dummy[FLASH_PAGE_SIZE - 4] {0}; // Sum : 4 }; void store_settings(Settings &settings); diff --git a/src/sidetone.h b/src/sidetone.h index ced5273..2c030e4 100644 --- a/src/sidetone.h +++ b/src/sidetone.h @@ -9,5 +9,5 @@ class Sidetone void off(); private: - uint m_gpio{0}; + uint m_gpio {0}; }; \ No newline at end of file