commit - b6e7f68400b5eb738b7f21a25567cc775312fc58
commit + c6370a3382c02a42216eaac28337d7515b6e2bbb
blob - ff0ea7d4e403249774217b3a1a91d861b2c0d772
blob + a746fd8596057553993a7f26552dbdbe9506d436
--- Morse.cpp
+++ Morse.cpp
uint8_t adc_inited;
-float dac_i = 0.0, dac_max = 6.283, volume;
+float dac_i = 0.0, dac_max = 6.283;
unsigned long gpio_tx_start_millis, gpio_tx_current_millis;
unsigned long gpio_handle_unit_millis;
if (dac_inited) {
dac_handle_chars();
if (dac_on) {
- dac_i += dac_max / 50; // ~ 660Hz
+ dac_i += dac_max / 30;
if (dac_i >= dac_max)
dac_i = 0.0;
- volume = (MAX_RAD * (dac_volume / 1000.0));
- dacWrite(dac_tx_pin, sin(dac_i) * volume + volume);
+ dacWrite(dac_tx_pin, sin(dac_i) * MAX_RAD + MAX_RAD);
}
}
}
blob - 2c689220dd6e95ff05605aff350c671df17848b2
blob + 363392aff0252a5265a2352d94626d3c695f0421
--- Morse.h
+++ Morse.h
{
// we've no rx code yet
public:
- float dac_volume = 100;
-
Morse(uint8_t type, uint8_t the_pin);
Morse(uint8_t type, uint8_t the_pin, uint8_t the_wpm);