auto-sync

This commit is contained in:
rusEfi 2014-11-07 16:03:18 -06:00
parent afa1cec1e0
commit f209d30f13
2 changed files with 6 additions and 2 deletions

View File

@ -42,11 +42,14 @@ int getRemainingStack(Thread *otp) {
#else /* __GNUC__ */ #else /* __GNUC__ */
extern uint32_t CSTACK$$Base; /* symbol created by the IAR linker */
extern uint32_t IRQSTACK$$Base; /* symbol created by the IAR linker */
int getRemainingStack(Thread *otp) { int getRemainingStack(Thread *otp) {
#if CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__) #if CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__)
int remainingStack; int remainingStack;
if (dbg_isr_cnt > 0) { if (dbg_isr_cnt > 0) {
remainingStack = 999; // todo remainingStack = (__get_SP() - sizeof(struct intctx)) - (int)&IRQSTACK$$Base;
} else { } else {
remainingStack = (stkalign_t *)(__get_SP() - sizeof(struct intctx)) - otp->p_stklimit; remainingStack = (stkalign_t *)(__get_SP() - sizeof(struct intctx)) - otp->p_stklimit;
} }

View File

@ -34,6 +34,7 @@ public class AutoTest {
private static void testDodgeNeon() { private static void testDodgeNeon() {
sendCommand("set_engine_type 2"); sendCommand("set_engine_type 2");
WaveChart chart; WaveChart chart;
sendCommand("set_whole_fuel_map 3");
IoUtil.changeRpm(2000); IoUtil.changeRpm(2000);
sendCommand("set_ignition_mode 1"); sendCommand("set_ignition_mode 1");
chart = nextChart(); chart = nextChart();
@ -45,7 +46,7 @@ public class AutoTest {
assertWave(msg, chart, WaveChart.INJECTOR_1, 0.133, x + 180); assertWave(msg, chart, WaveChart.INJECTOR_1, 0.133, x + 180);
assertWave(msg, chart, WaveChart.INJECTOR_3, 0.133, x + 360); assertWave(msg, chart, WaveChart.INJECTOR_3, 0.133, x + 360);
x = 122; x = 106;
assertWave(msg, chart, WaveChart.SPARK_4, 0.13333, x + 540); assertWave(msg, chart, WaveChart.SPARK_4, 0.13333, x + 540);
assertWave(msg, chart, WaveChart.SPARK_2, 0.13333, x); assertWave(msg, chart, WaveChart.SPARK_2, 0.13333, x);
assertWave(msg, chart, WaveChart.SPARK_1, 0.13333, x + 180); assertWave(msg, chart, WaveChart.SPARK_1, 0.13333, x + 180);