Example #1
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QMainWindow window;
    QChart *chart = new QChart();
    WaveChart *waveChart = new WaveChart(chart,&window);

    waveChart->setViewport( new QOpenGLWidget() );
    waveChart->setRenderHint(QPainter::Antialiasing);
    chart->setAnimationOptions(QChart::AllAnimations);
    chart->setTitle("This is wave generator.");

    window.setCentralWidget(waveChart);
    window.resize(400, 300);
    window.show();

    return a.exec();
}
Example #2
0
static THD_FUNCTION(waThread, arg) {
	(void)arg;
	chRegSetThreadName("Wave Analyzer");
#if EFI_ENGINE_SNIFFER
	while (true) {
		chThdSleepSeconds(CHART_RESET_DELAY);

		waveChart.publishIfFull();
	}
#endif /* EFI_ENGINE_SNIFFER */
}
Example #3
0
static msg_t waThread(void *arg) {
	(void)arg;
	chRegSetThreadName("Wave Analyzer");
#if EFI_WAVE_CHART
	while (TRUE) {
		chThdSleepSeconds(CHART_RESET_DELAY);

		waveChart.publishChartIfFull();
	}
#endif /* EFI_WAVE_CHART */
#if defined __GNUC__
	return -1;
#endif
}
Example #4
0
void setEngineType(int value) {
	engineConfiguration->engineType = (engine_type_e) value;
	resetConfigurationExt(&logger, (engine_type_e) value PASS_ENGINE_PARAMETER);
#if EFI_WAVE_CHART || defined(__DOXYGEN__)
	if (engine->isTestMode)
		waveChart.resetWaveChart();
#endif

#if EFI_INTERNAL_FLASH
	writeToFlashNow();
//	scheduleReset();
#endif /* EFI_PROD_CODE */
	incrementGlobalConfigurationVersion();
	doPrintConfiguration(engine);
}
Example #5
0
void setTriggerEmulatorRPM(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX) {
	engineConfiguration->bc.triggerSimulatorFrequency = rpm;
	/**
	 * All we need to do here is to change the periodMs
	 * togglePwmState() would see that the periodMs has changed and act accordingly
	 */
	if (rpm == 0) {
		triggerSignal.setFrequency(NAN);
	} else {
		float rpmM = getRpmMultiplier(engineConfiguration->operationMode);
		float rPerSecond = rpm * rpmM / 60.0; // per minute converted to per second
		triggerSignal.setFrequency(rPerSecond);
	}
#if EFI_ENGINE_SNIFFER
	if (engine->isTestMode)
		waveChart.reset();
#endif /* EFI_ENGINE_SNIFFER */

	scheduleMsg(logger, "Emulating position sensor(s). RPM=%d", rpm);
}
Example #6
0
static void resetNow(void) {
	skipUntilEngineCycle = engine->rpmCalculator.getRevolutionCounter() + 3;
	waveChart.reset();
}
void printPendingMessages(void) {
	updateDevConsoleState(engine);
	waveChart.publishIfFull();
}