mirror of
https://github.com/peterantypas/maiana.git
synced 2025-05-28 05:10:40 -07:00
Watchdog
This commit is contained in:
parent
423c0dc073
commit
8e536c54e8
@ -1141,9 +1141,9 @@
|
||||
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding.1984851120" name="Assume freestanding environment (-ffreestanding)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.freestanding" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin.1075429989" name="Disable builtin (-fno-builtin)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin" useByScannerDiscovery="true"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin.1075429989" name="Disable builtin (-fno-builtin)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.nobuiltin" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.spconstant.703973694" name="Single precision constants (-fsingle-precision-constant)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.spconstant" useByScannerDiscovery="true"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.spconstant.703973694" name="Single precision constants (-fsingle-precision-constant)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.spconstant" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.PIC.681252134" name="Position independent code (-fPIC)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.PIC" useByScannerDiscovery="true" value="false" valueType="boolean"/>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
||||
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1805734684583076923" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1804972565764657307" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
|
||||
|
@ -27,6 +27,8 @@
|
||||
#include "TXScheduler.hpp"
|
||||
#include "bsp.hpp"
|
||||
#include "GPS.hpp"
|
||||
#include "RadioManager.hpp"
|
||||
|
||||
|
||||
CommandProcessor &CommandProcessor::instance()
|
||||
{
|
||||
@ -56,6 +58,30 @@ void CommandProcessor::processEvent(const Event &e)
|
||||
}
|
||||
}
|
||||
|
||||
void fireTestPacket()
|
||||
{
|
||||
VHFChannel channel = CH_87;
|
||||
|
||||
if ( rand() % 2 == 0 )
|
||||
channel = CH_88;
|
||||
|
||||
TXPacket *p = TXPacketPool::instance().newTXPacket(channel);
|
||||
if ( !p ) {
|
||||
//DBG("Ooops! Out of TX packets :(\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a dummy packet of 9600 random bits, so it will take 1 second to transmit.
|
||||
* This is long enough for most spectrum analyzers to capture details using "max hold",
|
||||
* even at very low resolution bandwidths. Great way to measure power and look for
|
||||
* spurious emissions as well as harmonics.
|
||||
*/
|
||||
p->configureForTesting(channel, 9600);
|
||||
|
||||
RadioManager::instance().sendTestPacketNow(p);
|
||||
}
|
||||
|
||||
void CommandProcessor::processCommand(const char *buff)
|
||||
{
|
||||
string s(buff);
|
||||
@ -103,6 +129,10 @@ void CommandProcessor::processCommand(const char *buff)
|
||||
// Clear station data
|
||||
Configuration::instance().resetToDefaults();
|
||||
}
|
||||
else if ( s.find("tx test") == 0 )
|
||||
{
|
||||
fireTestPacket();
|
||||
}
|
||||
else if (s.find("reboot") == 0 )
|
||||
{
|
||||
bsp_reboot();
|
||||
|
@ -36,7 +36,7 @@ TIM_HandleTypeDef htim2;
|
||||
TIM_HandleTypeDef htim6;
|
||||
|
||||
void SystemClock_Config();
|
||||
void bsp_init_hw_tick();
|
||||
|
||||
|
||||
char_input_cb gnssInputCallback = nullptr;
|
||||
char_input_cb terminalInputCallback = nullptr;
|
||||
|
@ -32,30 +32,7 @@
|
||||
#include "timers.h"
|
||||
|
||||
|
||||
void fireTestPacket()
|
||||
{
|
||||
VHFChannel channel = CH_87;
|
||||
|
||||
if ( rand() % 2 == 0 )
|
||||
channel = CH_88;
|
||||
|
||||
TXPacket *p = TXPacketPool::instance().newTXPacket(channel);
|
||||
if ( !p ) {
|
||||
//DBG("Ooops! Out of TX packets :(\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a dummy packet of 9600 random bits, so it will take 1 second to transmit it.
|
||||
* This is long enough for most spectrum analyzers to capture details using "max hold",
|
||||
* even at very low resolution bandwidths. Great way to measure power and look for
|
||||
* spurious emissions as well as harmonics.
|
||||
*/
|
||||
p->configureForTesting(channel, 9600);
|
||||
|
||||
RadioManager::instance().sendTestPacketNow(p);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void determineCauseOfReset()
|
||||
{
|
||||
std::string cause;
|
||||
@ -69,6 +46,7 @@ void determineCauseOfReset()
|
||||
//DBG("Cause of reset: %s\r\n", cause.c_str());
|
||||
__HAL_RCC_CLEAR_RESET_FLAGS();
|
||||
}
|
||||
#endif
|
||||
|
||||
TimerHandle_t timerHandle1, timerHandle2;
|
||||
StaticTimer_t timer1, timer2;
|
||||
@ -113,12 +91,15 @@ void mainTask(void *params)
|
||||
timerHandle1 = xTimerCreateStatic("1sec", 1000, pdTRUE, NULL, on1sec, &timer1);
|
||||
xTimerStart(timerHandle1, 10);
|
||||
|
||||
timerHandle2 = xTimerCreateStatic("1min", 1000, pdTRUE, NULL, on1min, &timer2);
|
||||
timerHandle2 = xTimerCreateStatic("1min", 60000, pdTRUE, NULL, on1min, &timer2);
|
||||
xTimerStart(timerHandle2, 10);
|
||||
|
||||
bsp_start_wdt();
|
||||
while (1)
|
||||
{
|
||||
EventQueue::instance().dispatch();
|
||||
vTaskDelay(50);
|
||||
bsp_refresh_wdt();
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,7 +114,7 @@ __attribute__((used)) void vApplicationStackOverflowHook( TaskHandle_t xTask, si
|
||||
|
||||
int main(void)
|
||||
{
|
||||
*(uint8_t *)0xe000ed08 |= 2;
|
||||
//*(uint8_t *)0xe000ed08 |= 2;
|
||||
bsp_hw_init();
|
||||
|
||||
TaskHandle_t xHandle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user