kopia lustrzana https://github.com/mobilinkd/tnc3-firmware
Fix modulator configuration issue when running without battery. Update version to 1.1.5.
rodzic
37e220afe6
commit
5aaed41cac
|
@ -55,6 +55,7 @@
|
|||
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include <stdint.h>
|
||||
#include <cmsis_os.h>
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
|
@ -163,6 +164,7 @@ extern int go_back_to_sleep;
|
|||
extern int usb_wake_state;
|
||||
extern int charging_enabled;
|
||||
extern int reset_button;
|
||||
extern osMutexId hardwareInitMutexHandle;
|
||||
|
||||
#define CxxErrorHandler() _Error_Handler(const_cast<char*>(__FILE__), __LINE__)
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ osStaticTimerDef_t usbShutdownTimerControlBlock;
|
|||
|
||||
/* USER CODE BEGIN PV */
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
osMutexId hardwareInitMutexHandle;
|
||||
|
||||
int lost_power = 0;
|
||||
int reset_requested = 0;
|
||||
|
@ -501,6 +502,10 @@ int main(void)
|
|||
|
||||
/* USER CODE BEGIN RTOS_MUTEX */
|
||||
/* add mutexes, ... */
|
||||
osMutexDef(hardwareInitMutex);
|
||||
hardwareInitMutexHandle = osMutexCreate(osMutex(hardwareInitMutex));
|
||||
osMutexWait(hardwareInitMutexHandle, osWaitForever);
|
||||
|
||||
/* USER CODE END RTOS_MUTEX */
|
||||
|
||||
/* USER CODE BEGIN RTOS_SEMAPHORES */
|
||||
|
|
|
@ -61,7 +61,10 @@ void startIOEventTask(void const*)
|
|||
hardware.store();
|
||||
}
|
||||
|
||||
osMutexRelease(hardwareInitMutexHandle);
|
||||
|
||||
if (!go_back_to_sleep) {
|
||||
|
||||
hardware.debug();
|
||||
|
||||
audio::init_log_volume();
|
||||
|
|
|
@ -26,7 +26,7 @@ int powerOffViaUSB(void)
|
|||
|
||||
namespace mobilinkd { namespace tnc { namespace kiss {
|
||||
|
||||
const char FIRMWARE_VERSION[] = "1.1.4";
|
||||
const char FIRMWARE_VERSION[] = "1.1.5";
|
||||
const char HARDWARE_VERSION[] = "Mobilinkd TNC3 2.1.1";
|
||||
|
||||
Hardware& settings()
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "ModulatorTask.hpp"
|
||||
#include "KissHardware.hpp"
|
||||
#include "main.h"
|
||||
|
||||
mobilinkd::tnc::SimplexPTT simplexPtt;
|
||||
mobilinkd::tnc::MultiplexPTT multiplexPtt;
|
||||
|
@ -69,6 +70,9 @@ void startModulatorTask(void const*) {
|
|||
|
||||
using namespace mobilinkd::tnc::kiss;
|
||||
|
||||
// Wait until hardware is initialized before creating modulator.
|
||||
osMutexWait(hardwareInitMutexHandle, osWaitForever);
|
||||
|
||||
modulator = &(getModulator());
|
||||
encoder = &(getEncoder());
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue