more cleanup
This commit is contained in:
parent
1cc6f82e5c
commit
1ba9653578
1 changed files with 8 additions and 10 deletions
18
src/keyer.h
18
src/keyer.h
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
//#include <string>
|
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "sidetone.h"
|
#include "sidetone.h"
|
||||||
|
@ -14,7 +13,6 @@ class Keyer final
|
||||||
|
|
||||||
void setMode(Mode mode) { m_mode = mode; }
|
void setMode(Mode mode) { m_mode = mode; }
|
||||||
void setSpeed(uint8_t wpm);
|
void setSpeed(uint8_t wpm);
|
||||||
//void sendMessage(std::string msg);
|
|
||||||
void sendCharacter(const char ch);
|
void sendCharacter(const char ch);
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
@ -31,13 +29,13 @@ class Keyer final
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class MessageState {
|
enum class MessageState {
|
||||||
Wait,
|
Wait,
|
||||||
Dit,
|
Dit,
|
||||||
Dah,
|
Dah,
|
||||||
IntraCharSpace,
|
IntraCharSpace,
|
||||||
InterCharSpace,
|
InterCharSpace,
|
||||||
InterWordSpace,
|
InterWordSpace,
|
||||||
Abort,
|
Abort,
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8_t m_wpm {18};
|
uint8_t m_wpm {18};
|
||||||
|
@ -54,7 +52,7 @@ class Keyer final
|
||||||
|
|
||||||
std::queue<char> m_messageQueue;
|
std::queue<char> m_messageQueue;
|
||||||
MessageState m_messageKeyingState {MessageState::Wait};
|
MessageState m_messageKeyingState {MessageState::Wait};
|
||||||
char m_messageChar{};
|
char m_messageChar {};
|
||||||
|
|
||||||
uint64_t m_elementDuration {0};
|
uint64_t m_elementDuration {0};
|
||||||
bool m_currentlyKeying {false};
|
bool m_currentlyKeying {false};
|
||||||
|
|
Loading…
Reference in a new issue