View Single Post
Old 01-19-2017, 11:03 AM   #48 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by meelis11 View Post
you can push changes only when new feature is ready - it is not good practice anyway to push changes when new feature is not complete and gives compilation errors. I think for some people DIFF would be nice thing to see when new feature is ready
New features are given their own #define/#ifdef combination, and the #define is commented out until I consider the new feature to be ready. It seems to have worked well these past several years.

All features also undergo testing on three separate test platforms, before I consider them ready. I have a JellyBeanDriver MPGuino that doubles as my Magnum's fuel monitor, I have an Arduino AtMega2560 with a 5-position Parallax analog joystick and a Parallax serial LCD module, and I have a TinkerKit! LCD module with another Parallax 5-position analog joystick (the TinkerKit! LCD module is nothing more than an Arduino Leonardo with an attached HD44780-compatible 16x2 LCD display, and a few handy electrical connectors).

My testing mainly makes sure that the feature in question actually works as intended. Secondary concerns (e.g., the horsepower readout on the accel test feature shows "PSI" instead of "HP") will be worked on as time permits.

Quote:
Originally Posted by meelis11 View Post
I just published my code and schematic in my webpage
MPGuino trip computer - User manual/Installation
I get these errors when I tried to compile your code just now. Does your code require an obsolete version of Arduino IDE for successful compilation?

Code:
Arduino: 1.6.12 (Windows 7), Board: "Arduino/Genuino Uno"

mpguino:802: error: 'prog_char' was not declared in this scope

 char *getStr(prog_char * str) { 

               ^

mpguino:802: error: 'str' was not declared in this scope

 char *getStr(prog_char * str) { 

                           ^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,

                 from sketch\mpguino_code_meelis11.ino.cpp:1:

mpguino:40: error: variable 'chars' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

   static char chars[] PROGMEM = {

                       ^

mpguino:53: error: variable 'barchars' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

   static char barchars[] PROGMEM = {

                          ^

mpguino:326: error: 'prog_char' does not name a type

 prog_char  * displayFuncNames[displayFuncSize]; 

 ^

C:\Users\vagota\Downloads\mpguino_code_meelis11\mpguino.ino: In function 'void setup()':

mpguino:346: error: 'displayFuncNames' was not declared in this scope

    displayFuncNames[x++]=  PSTR("Custom"); 

    ^

mpguino:389: error: 'getStr' cannot be used as a function

    LCD::print(getStr(PSTR("OpenGauge")));      

                                       ^

mpguino:391: error: 'getStr' cannot be used as a function

    LCD::print(getStr(PSTR(STARTUP_TEXT)));

                                        ^

C:\Users\vagota\Downloads\mpguino_code_meelis11\mpguino.ino: In function 'void loop()':

mpguino:625: error: 'getStr' cannot be used as a function

          LCD::print(getStr(PSTR("Setup ")));    

                                          ^

mpguino:631: error: 'getStr' cannot be used as a function

          LCD::print(getStr(PSTR("Tank Reset ")));      

                                               ^

mpguino:636: error: 'getStr' cannot be used as a function

          LCD::print(getStr(PSTR("Current Reset ")));      

                                                  ^

mpguino:655: error: 'displayFuncNames' was not declared in this scope

          LCD::print(getStr(displayFuncNames[SCREEN]));      

                            ^

mpguino:655: error: 'getStr' cannot be used as a function

          LCD::print(getStr(displayFuncNames[SCREEN]));      

                                                    ^

mpguino:661: error: 'getStr' cannot be used as a function

             LCD::print(getStr(PSTR("DragRace Reset")));   

                                                     ^

mpguino:672: error: 'getStr' cannot be used as a function

          LCD::print(getStr(PSTR("Brightness ")));

                                               ^

mpguino:680: error: 'displayFuncNames' was not declared in this scope

          LCD::print(getStr(displayFuncNames[SCREEN]));      

                            ^

mpguino:680: error: 'getStr' cannot be used as a function

          LCD::print(getStr(displayFuncNames[SCREEN]));      

                                                    ^

C:\Users\vagota\Downloads\mpguino_code_meelis11\mpguino.ino: At global scope:

mpguino:802: error: redefinition of 'char* getStr'

 char *getStr(prog_char * str) { 

              ^

C:\Users\vagota\Downloads\mpguino_code_meelis11\mpguino.ino:802:8: note: 'char* getStr' previously defined here

 char *getStr(prog_char * str) { 

        ^

mpguino:802: error: 'prog_char' was not declared in this scope

 char *getStr(prog_char * str) { 

              ^

mpguino:802: error: 'str' was not declared in this scope

 char *getStr(prog_char * str) { 

                          ^

exit status 1
'prog_char' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
  Reply With Quote