diverse changes, cleanup

This commit is contained in:
2025-12-14 15:03:54 +01:00
parent 0f3fff60e4
commit 0e92f8cd36
19 changed files with 86754 additions and 10 deletions
@@ -40,6 +40,44 @@
</dependencies>
</framework-data>
</AsfFrameworkConfig>
<avrtool>com.atmel.avrdbg.tool.ispmk2</avrtool>
<avrtoolserialnumber>0000000000000</avrtoolserialnumber>
<avrdeviceexpectedsignature>0x1E920A</avrdeviceexpectedsignature>
<avrtoolinterface>ISP</avrtoolinterface>
<avrtoolinterfaceclock>125000</avrtoolinterfaceclock>
<com_atmel_avrdbg_tool_ispmk2>
<ToolOptions>
<InterfaceProperties>
<IspClock>125000</IspClock>
</InterfaceProperties>
<InterfaceName>ISP</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.ispmk2</ToolType>
<ToolNumber>0000000000000</ToolNumber>
<ToolName>AVRISP mkII</ToolName>
</com_atmel_avrdbg_tool_ispmk2>
<custom>
<ToolOptions xmlns="">
<InterfaceProperties>
</InterfaceProperties>
<InterfaceName>ISP</InterfaceName>
</ToolOptions>
<ToolType xmlns="">custom</ToolType>
<ToolNumber xmlns="">
</ToolNumber>
<ToolName xmlns="">Custom Programming Tool</ToolName>
</custom>
<com_atmel_avrdbg_tool_simulator>
<ToolOptions xmlns="">
<InterfaceProperties>
</InterfaceProperties>
<InterfaceName>ISP</InterfaceName>
</ToolOptions>
<ToolType xmlns="">com.atmel.avrdbg.tool.simulator</ToolType>
<ToolNumber xmlns="">
</ToolNumber>
<ToolName xmlns="">Simulator</ToolName>
</com_atmel_avrdbg_tool_simulator>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
+13 -6
View File
@@ -17,18 +17,24 @@
class Programm {
private:
void ResetTimer() {
led.SetColor(Led::CYAN);
//timer.Reset();
if(this->reset_running) {
return;
}
this->reset_running = true;
led.SetColor(Led::RED);
timer.Reset();
if(!this->timer_running) {
audio.SetFunk();
//timer.Start();
timer.Start();
}
_delay_ms(1);
this->timer_running = true;
this->reset_running = false;
}
void TimerEnd() {
audio.SetRadio();
//timer.Stop();
timer.Stop();
this->timer_running = false;
}
public:
@@ -37,7 +43,7 @@ class Programm {
}
void Setup() {
led.SetColor(Led::RED);
led.SetColor(Led::BLUE);
_delay_ms(500);
}
@@ -71,8 +77,9 @@ class Programm {
Led led;
Comperator comp;
Ptt ptt;
//Timer timer;
Timer timer;
protected:
bool timer_running;
bool reset_running;
public:
};
+7 -3
View File
@@ -11,7 +11,7 @@
#include <avr/io.h>
template <long int timer_count_till, int timer_prescaler>
template <int timer_count_till, int timer_prescaler>
class TimerT {
// Methods
private:
@@ -24,8 +24,12 @@ class TimerT {
TCNT1 = 0;
OCR1AH = (timer_count_till<<8);
OCR1AL = timer_count_till;
//OCR1AH = (uint8_t)(timer_count_till<<8);
//OCR1AL = (uint8_t)timer_count_till;
//OCR1A = 39062;
OCR1A = timer_count_till;
TIMSK1 = (1<<ICIE1) | (1<<OCIE1A);
}