03-12-2017, 07:21 PM
|
#91 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
After I made the change you indicated, the problem did not happen again.
I'll go back to activate deep sleep to see if it happens again or if it was some failure in arduino recording.
Quote:
Originally Posted by t vago
|
This was very good to be able to access MPGuino through the android.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
03-13-2017, 01:24 AM
|
#92 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Quote:
Originally Posted by josemapiro
Hi t vago
After I made the change you indicated, the problem did not happen again.
I'll go back to activate deep sleep to see if it happens again or if it was some failure in arduino recording.
|
You can try that. I will verify the configuration settings for the AtMega2560 for reduced power mode.
Quote:
Originally Posted by josemapiro
This was very good to be able to access MPGuino through the android.
|
That's what I'm thinking, too. At least, it would be nice to be able to record a logfile with an Android.
|
|
|
03-23-2017, 07:06 PM
|
#93 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
The problem still continues, it is not always but sometimes it just wakes up with the movement.
Quote:
Originally Posted by t vago
That's what I'm thinking, too. At least, it would be nice to be able to record a logfile with an Android.
|
I think it should be possible to use the JSON output for this.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
03-24-2017, 01:07 AM
|
#94 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Quote:
Originally Posted by josemapiro
Hi t vago
The problem still continues, it is not always but sometimes it just wakes up with the movement.
|
I finally figured out why this is so. This problem affects AtMega2560 boards only.
Basically, the problem lies with the pins used to capture the fuel injector signal. The interrupts, INT4 and INT5, associated with those pins are not fully supported by the wake-up module on the AtMega2560. To capture fuel injector pulses, MPGuino configures these two pins in such that, if sleep modes deeper than IDLE are selected, the AtMega2560 will never wake up from those interrupts.
Now, I could move the fuel injector pins from 3/2 (PE5/PE4) to 18/19 (PD3/PD2), and that would move the interrupts to INT3/INT2, which do allow MPGuino to wake up the AtMega2560 with fuel injector pulses. That's an easy and sure fix, but it would force you to change your fuel injector wiring to use these other two pins. That would certainly fix the problem.
Another option, which I am not as sure will work, is to make changes to the code to configure the INT4/INT5 interrupts to a setting that should cause the AtMega2560 to wake up, immediately before the AtMega2560 goes to sleep. Then, once the AtMega2560 is awake, re-configure the INT4/INT5 pins for use by MPGuino.
A third option would be to disallow sleep modes with the AtMega2560. That's not a good option at all.
Quote:
Originally Posted by josemapiro
I think it should be possible to use the JSON output for this.
|
You could also record just the raw data, and have an Android app handle the display. It'd be the ultimate MPGuino display.
|
|
|
03-24-2017, 02:40 PM
|
#95 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
It is undoubtedly best to change the interrupts for INT3/INT2, changing the wiring is not a problem and thus correcting the limitation.
You may want to put a note that alerts to this change.
Quote:
Originally Posted by t vago
You could also record just the raw data, and have an Android app handle the display. It'd be the ultimate MPGuino display.
|
Yes no doubt that it would be a good 2nd monitor for the MPGuino with more information, but it is always convenient to have one fixed in the car to avoid always placing the mobile phone or tablet that may be necessary to receive calls over bluetooth.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
04-01-2017, 09:31 AM
|
#96 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
What part of the code do I have to change to work with INT2 / INT3?
Thanks
José Rodrigues
|
|
|
04-08-2017, 01:33 AM
|
#97 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Quote:
Originally Posted by josemapiro
Hi t vago
What part of the code do I have to change to work with INT2 / INT3?
Thanks
José Rodrigues
|
Here, try this version. It has the necessary corrections to use INT2/INT3.
It also has some mostly untested modifications to the menu system that serve as a step toward the submenus you asked for.
Let me know how they work.
Last edited by t vago; 04-09-2017 at 08:23 PM..
Reason: removed buggy codefixes
|
|
|
The Following User Says Thank You to t vago For This Useful Post:
|
|
04-08-2017, 01:37 PM
|
#98 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
This new version is giving the following error.
Code:
Arduino: 1.8.0 (Windows 10), Placa:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
E:\arduino-1.8.0\arduino-builder -dump-prefs -logger=machine -hardware E:\arduino-1.8.0\hardware -tools E:\arduino-1.8.0\tools-builder -tools E:\arduino-1.8.0\hardware\tools\avr -built-in-libraries E:\arduino-1.8.0\libraries -libraries C:\Users\josem\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10800 -build-path C:\Users\josem\AppData\Local\Temp\arduino_build_897858 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=E:\arduino-1.8.0\hardware\tools\avr -prefs=runtime.tools.avrdude.path=E:\arduino-1.8.0\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=E:\arduino-1.8.0\hardware\tools\avr -verbose C:\Users\josem\Desktop\MPGuino\MPGuino.ino
E:\arduino-1.8.0\arduino-builder -compile -logger=machine -hardware E:\arduino-1.8.0\hardware -tools E:\arduino-1.8.0\tools-builder -tools E:\arduino-1.8.0\hardware\tools\avr -built-in-libraries E:\arduino-1.8.0\libraries -libraries C:\Users\josem\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10800 -build-path C:\Users\josem\AppData\Local\Temp\arduino_build_897858 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=E:\arduino-1.8.0\hardware\tools\avr -prefs=runtime.tools.avrdude.path=E:\arduino-1.8.0\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=E:\arduino-1.8.0\hardware\tools\avr -verbose C:\Users\josem\Desktop\MPGuino\MPGuino.ino
Using board 'mega' from platform in folder: E:\arduino-1.8.0\hardware\arduino\avr
Using core 'arduino' from platform in folder: E:\arduino-1.8.0\hardware\arduino\avr
Detecting libraries used...
"E:\arduino-1.8.0\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10800 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IE:\arduino-1.8.0\hardware\arduino\avr\cores\arduino" "-IE:\arduino-1.8.0\hardware\arduino\avr\variants\mega" "C:\Users\josem\AppData\Local\Temp\arduino_build_897858\sketch\MPGuino.ino.cpp" -o "nul"
Generating function prototypes...
"E:\arduino-1.8.0\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10800 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IE:\arduino-1.8.0\hardware\arduino\avr\cores\arduino" "-IE:\arduino-1.8.0\hardware\arduino\avr\variants\mega" "C:\Users\josem\AppData\Local\Temp\arduino_build_897858\sketch\MPGuino.ino.cpp" -o "C:\Users\josem\AppData\Local\Temp\arduino_build_897858\preproc\ctags_target_for_gcc_minus_e.cpp"
"E:\arduino-1.8.0\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\josem\AppData\Local\Temp\arduino_build_897858\preproc\ctags_target_for_gcc_minus_e.cpp"
A compilar o rascunho...
"E:\arduino-1.8.0\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10800 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IE:\arduino-1.8.0\hardware\arduino\avr\cores\arduino" "-IE:\arduino-1.8.0\hardware\arduino\avr\variants\mega" "C:\Users\josem\AppData\Local\Temp\arduino_build_897858\sketch\MPGuino.ino.cpp" -o "C:\Users\josem\AppData\Local\Temp\arduino_build_897858\sketch\MPGuino.ino.cpp.o"
MPGuino:4584: error: expected '}' before '{' token
{FuelSettingScreenIdx, stmFuelSettings}
^
MPGuino:4584: error: expected ',' or ';' before '{' token
MPGuino:4585: error: expected unqualified-id before '{' token
{MiscSettingScreenIdx, stmMiscSettings}
^
MPGuino:4587: error: expected unqualified-id before ',' token
,{dragRaceIdx, stmDragRace}
^
MPGuino:4587: error: expected unqualified-id before '{' token
,{dragRaceIdx, stmDragRace}
^
MPGuino:4590: error: expected unqualified-id before ',' token
,{coastdownIdx, stmCoastdown}
^
MPGuino:4590: error: expected unqualified-id before '{' token
,{coastdownIdx, stmCoastdown}
^
MPGuino:4593: error: expected unqualified-id before ',' token
,{partialRefuelScreenIdx, stmPartialRefuel}
^
MPGuino:4593: error: expected unqualified-id before '{' token
,{partialRefuelScreenIdx, stmPartialRefuel}
^
MPGuino:4596: error: expected unqualified-id before ',' token
,{tripSaveCurScreenIdx, stmCurrSave}
^
MPGuino:4596: error: expected unqualified-id before '{' token
,{tripSaveCurScreenIdx, stmCurrSave}
^
MPGuino:4597: error: expected unqualified-id before ',' token
,{tripSaveTankScreenIdx, stmTankSave}
^
MPGuino:4597: error: expected unqualified-id before '{' token
,{tripSaveTankScreenIdx, stmTankSave}
^
MPGuino:4608: error: expected unqualified-id before ',' token
,{bigFEscreenIdx, stmBigFE}
^
MPGuino:4608: error: expected unqualified-id before '{' token
,{bigFEscreenIdx, stmBigFE}
^
MPGuino:4611: error: expected unqualified-id before ',' token
,{barFEvTscreenIdx, stmFEvT}
^
MPGuino:4611: error: expected unqualified-id before '{' token
,{barFEvTscreenIdx, stmFEvT}
^
MPGuino:4614: error: expected unqualified-id before ',' token
,{barFEvSscreenIdx, stmFEvS}
^
MPGuino:4614: error: expected unqualified-id before '{' token
,{barFEvSscreenIdx, stmFEvS}
^
MPGuino:4617: error: expected unqualified-id before ',' token
,{bigDTEscreenIdx, stmBigDTE}
^
MPGuino:4617: error: expected unqualified-id before '{' token
,{bigDTEscreenIdx, stmBigDTE}
^
MPGuino:4620: error: expected unqualified-id before ',' token
,{bigTTEscreenIdx, stmBigTTE}
^
MPGuino:4620: error: expected unqualified-id before '{' token
,{bigTTEscreenIdx, stmBigTTE}
^
MPGuino:4629: error: expected unqualified-id before ',' token
,{CPUmonScreenIdx, stmCPUinfo}
^
MPGuino:4629: error: expected unqualified-id before '{' token
,{CPUmonScreenIdx, stmCPUinfo}
^
MPGuino:4631: error: expected unqualified-id before ',' token
,{mainScreenIdx, stmMain}
^
MPGuino:4631: error: expected unqualified-id before '{' token
,{mainScreenIdx, stmMain}
^
MPGuino:4632: error: expected declaration before '}' token
};
^
exit status 1
expected '}' before '{' token
thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
04-09-2017, 08:24 PM
|
#99 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Ooops! Forgot about the bugs there. This is the version I tested that corrected those typos.
I think it's configured for an Arduino UNO.
Last edited by t vago; 04-10-2017 at 04:25 PM..
Reason: Removed beta code for version control
|
|
|
The Following User Says Thank You to t vago For This Useful Post:
|
|
04-10-2017, 08:51 AM
|
#100 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
I have been testing this new version, and it is working well with INT2 and INT3, I have not yet checked to see if I have the same problem but I think I will not have it, and the menus are on the right track, but Accuracy of some corrections.
In "LCD Settings" it is recommended that display only the settings related to the LCD and others. The same goes for "Fuel Settings".
In "Load/Save Curr" and "Load/Save Tank" should be in the single "Load/Save" or separated but one for "Load" and another for "Save".
The same happens with the big numbers that must be all together in a single "Big Numbers".
"FE/Time" and "FE/Speed" should also be in "FE/Graphics"
After everything is ready, it would be nice if it was easier to access the menu, the best would be to press the middle button, because it is not practical, because we have to have a good synchrony with the two buttons. It is only after several attempts that I can access the menu.
Another correction that should be done is in the information at the beginning of the code that is still with INT4 and INT5, so do not to mislead anyone.
Code:
Arduino Mega 2560
injector sense open PE4 (INT4), Digital 2
injector sense close PE5 (INT5), Digital 3
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
|