auto-sync

This commit is contained in:
rusEfi 2014-11-15 19:03:22 -06:00
parent 6d1b2d5026
commit 7789fbe4cc
5 changed files with 11 additions and 6 deletions

View File

@ -12,7 +12,7 @@
#define EFI_USE_CCM TRUE
#define EFI_ENABLE_ASSERTS FALSE
#define EFI_ENABLE_ASSERTS TRUE
//#define EFI_UART_ECHO_TEST_MODE TRUE

View File

@ -108,14 +108,14 @@ void appendFast(Logging *logging, const char *text) {
static void vappendPrintfI(Logging *logging, const char *fmt, va_list arg) {
intermediateLoggingBuffer.eos = 0; // reset
efiAssertVoid(getRemainingStack(chThdSelf()) > 196, "lowstck#1b");
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#1b");
chvprintf((BaseSequentialStream *) &intermediateLoggingBuffer, fmt, arg);
intermediateLoggingBuffer.buffer[intermediateLoggingBuffer.eos] = 0; // need to terminate explicitly
append(logging, (char *) intermediateLoggingBufferData);
}
void vappendPrintf(Logging *logging, const char *fmt, va_list arg) {
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#5b");
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#5b");
if (!intermediateLoggingBufferInited) {
firmwareError("intermediateLoggingBufferInited not inited!");
return;
@ -142,7 +142,7 @@ void vappendPrintf(Logging *logging, const char *fmt, va_list arg) {
}
void appendPrintf(Logging *logging, const char *fmt, ...) {
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#4");
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#4");
va_list ap;
va_start(ap, fmt);
vappendPrintf(logging, fmt, ap);

View File

@ -169,6 +169,7 @@ void TriggerState::nextTriggerEvent(trigger_wheel_e triggerWheel, uint64_t nowNt
void TriggerState::clear() {
memset(eventCount, 0, sizeof(eventCount));
memset(eventCountExt, 0, sizeof(eventCountExt));
memset(timeOfPreviousEventNt, 0, sizeof(timeOfPreviousEventNt));
memset(totalTimeNt, 0, sizeof(totalTimeNt));
current_index = 0;

View File

@ -38,7 +38,7 @@ typedef unsigned int time_t;
// project-wide default thread stack size
// see also PORT_INT_REQUIRED_STACK
#define UTILITY_THREAD_STACK_SIZE 128
#define UTILITY_THREAD_STACK_SIZE 400
#define EFI_ERROR_CODE 0xffffffff

View File

@ -1,6 +1,7 @@
package com.rusefi.ui.widgets;
import com.irnems.core.Sensor;
import com.rusefi.SimulatorHelper;
import com.rusefi.io.CommandQueue;
import javax.swing.*;
@ -51,7 +52,7 @@ public class DetachedSensor {
public void showMockControl() {
mockControlPanel.removeAll();
boolean isMockable = MOCKABLE.contains(sensor);
boolean isMockable = isMockable();
if (isMockable) {
Component mockComponent = createMockVoltageSlider(sensor);
mockControlPanel.add(mockComponent);
@ -62,6 +63,9 @@ public class DetachedSensor {
frame.setSize(size, h);
}
private boolean isMockable() {
return MOCKABLE.contains(sensor) && SimulatorHelper.RUNNING_SIMULATOR;
}
private static Component createMockVoltageSlider(final Sensor sensor) {
/**