Cleanup of not needed code
This commit is contained in:
parent
3c2ff5e8c7
commit
d63640d437
File diff suppressed because it is too large
Load Diff
@ -1,25 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1502405410" name="Debug">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-516381900687258877" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1788779437" name="Release">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-516381900687258877" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
|
||||
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1502405410" name="Debug">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1870342659776466326" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
|
||||
</provider>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.1788779437" name="Release">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1307432939745961523" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
|
||||
</provider>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
</project>
|
||||
|
@ -24,10 +24,7 @@
|
||||
#define LOG_MODULE "App"
|
||||
#include "Log.h"
|
||||
|
||||
static Protocol::SweepSettings settings;
|
||||
static uint16_t lastPoint;
|
||||
|
||||
static Protocol::PacketInfo recv_packet, transmit_packet;
|
||||
static Protocol::PacketInfo recv_packet;
|
||||
static TaskHandle_t handle;
|
||||
|
||||
#if HW_REVISION >= 'B'
|
||||
@ -39,18 +36,7 @@ static TaskHandle_t handle;
|
||||
extern ADC_HandleTypeDef hadc1;
|
||||
|
||||
#define FLAG_USB_PACKET 0x01
|
||||
#define FLAG_DATAPOINT 0x02
|
||||
|
||||
static void VNACallback(const Protocol::Datapoint &res) {
|
||||
DEBUG2_HIGH();
|
||||
transmit_packet.type = Protocol::PacketType::Datapoint;
|
||||
transmit_packet.datapoint = res;
|
||||
lastPoint = res.pointNum;
|
||||
BaseType_t woken = false;
|
||||
xTaskNotifyFromISR(handle, FLAG_DATAPOINT, eSetBits, &woken);
|
||||
portYIELD_FROM_ISR(woken);
|
||||
DEBUG2_LOW();
|
||||
}
|
||||
static void USBPacketReceived(const Protocol::PacketInfo &p) {
|
||||
recv_packet = p;
|
||||
BaseType_t woken = false;
|
||||
@ -119,16 +105,11 @@ void App_Start() {
|
||||
uint32_t notification;
|
||||
if(xTaskNotifyWait(0x00, UINT32_MAX, ¬ification, 100) == pdPASS) {
|
||||
// something happened
|
||||
if(notification & FLAG_DATAPOINT) {
|
||||
Communication::Send(transmit_packet);
|
||||
lastNewPoint = HAL_GetTick();
|
||||
}
|
||||
if(notification & FLAG_USB_PACKET) {
|
||||
switch(recv_packet.type) {
|
||||
case Protocol::PacketType::SweepSettings:
|
||||
LOG_INFO("New settings received");
|
||||
settings = recv_packet.settings;
|
||||
sweepActive = VNA::Setup(settings, VNACallback);
|
||||
sweepActive = VNA::Setup(recv_packet.settings);
|
||||
lastNewPoint = HAL_GetTick();
|
||||
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
|
||||
break;
|
||||
@ -218,16 +199,5 @@ void App_Start() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if(sweepActive && HAL_GetTick() - lastNewPoint > 1000) {
|
||||
// LOG_WARN("Timed out waiting for point, last received point was %d (Status 0x%04x)", lastPoint, FPGA::GetStatus());
|
||||
// FPGA::AbortSweep();
|
||||
// // restart the current sweep
|
||||
// HW::Init();
|
||||
// HW::Ref::update();
|
||||
// VNA::Setup(settings, VNACallback);
|
||||
// sweepActive = true;
|
||||
// lastNewPoint = HAL_GetTick();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
#define LOG_MODULE "VNA"
|
||||
#include "Log.h"
|
||||
|
||||
static VNA::SweepCallback sweepCallback;
|
||||
static Protocol::SweepSettings settings;
|
||||
static uint16_t pointCnt;
|
||||
static bool excitingPort1;
|
||||
@ -44,7 +43,7 @@ static_assert(alternativePhaseInc * alternativeSamplerate == 4096 * HW::IF2, "DF
|
||||
|
||||
using namespace HWHAL;
|
||||
|
||||
bool VNA::Setup(Protocol::SweepSettings s, SweepCallback cb) {
|
||||
bool VNA::Setup(Protocol::SweepSettings s) {
|
||||
VNA::Stop();
|
||||
vTaskDelay(5);
|
||||
HW::SetMode(HW::Mode::VNA);
|
||||
@ -54,7 +53,6 @@ bool VNA::Setup(Protocol::SweepSettings s, SweepCallback cb) {
|
||||
active = false;
|
||||
return false;
|
||||
}
|
||||
sweepCallback = cb;
|
||||
settings = s;
|
||||
// Abort possible active sweep first
|
||||
FPGA::SetMode(FPGA::Mode::FPGA);
|
||||
@ -200,9 +198,6 @@ static void PassOnData() {
|
||||
info.type = Protocol::PacketType::Datapoint;
|
||||
info.datapoint = data;
|
||||
Communication::Send(info);
|
||||
// if (sweepCallback) {
|
||||
// sweepCallback(data);
|
||||
// }
|
||||
}
|
||||
|
||||
bool VNA::MeasurementDone(const FPGA::SamplingResult &result) {
|
||||
|
@ -6,9 +6,7 @@
|
||||
|
||||
namespace VNA {
|
||||
|
||||
using SweepCallback = void(*)(const Protocol::Datapoint&);
|
||||
|
||||
bool Setup(Protocol::SweepSettings s, SweepCallback cb);
|
||||
bool Setup(Protocol::SweepSettings s);
|
||||
bool MeasurementDone(const FPGA::SamplingResult &result);
|
||||
void Work();
|
||||
void SweepHalted();
|
||||
|
Loading…
Reference in New Issue
Block a user