Skip to content

Commit

Permalink
- fixed some compile errors from conversion to new files layout
Browse files Browse the repository at this point in the history
+ new coptertest 7 from some additional errors after conversion to new files layout
- several undefs to avoid cpp warnings



git-svn-id: http://multiwii.googlecode.com/svn/trunk/MultiWii_shared@1536 02679b44-d973-9852-f2fa-63770883b36c
  • Loading branch information
[email protected] committed Jul 7, 2013
1 parent d2bdd6e commit f415957
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
4 changes: 3 additions & 1 deletion LCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "RX.h"
#include "Serial.h"
#include "Sensors.h"
#include "LCD.h"

void __u8Inc(void * var, int16_t inc);
void __s8Inc(void * var, int16_t inc);
Expand Down Expand Up @@ -753,7 +754,7 @@ void LCDprintInt16(int16_t v) {
}
void lcdprint_uint32(uint32_t v) {
static char line[14] = "-.---.---.---";
// 0 2 4 6 8 12
// 0 2 4 6 8 12
line[0] = '0' + v / 1000000000;
line[2] = '0' + v / 100000000 - (v/1000000000) * 10;
line[3] = '0' + v / 10000000 - (v/100000000) * 10;
Expand Down Expand Up @@ -1565,6 +1566,7 @@ void configurationLoop() {
#if defined(PRI_SERVO_TO)
#define MAX_SERV 7
#if(PRI_SERVO_TO < MAX_SERV)
#undef MAX_SERV
#define MAX_SERV PRI_SERVO_TO
#endif
for(i=PRI_SERVO_FROM-1; i<MAX_SERV; i++) servo[i] = conf.servoConf[i].middle;
Expand Down
2 changes: 2 additions & 0 deletions LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ void configurationLoop();
void LCDprint(uint8_t i);
void lcd_telemetry();
void initLCD();
void i2c_OLED_DIGOLE_init ();
void i2c_OLED_init();
void LCDclear();
void toggle_telemetry(uint8_t t);
void dumpPLog(uint8_t full);
Expand Down
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1084,4 +1084,4 @@
/**** END OF CONFIGURABLE PARAMETERS ****/
/*************************************************************************************************/

#endif /* CONFIG_H_ */
#endif /* CONFIG_H_ */
38 changes: 38 additions & 0 deletions def.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,31 @@
#define DISPLAY_FONT_DSIZE
#define OLED_DIGOLE
#define LCD_CONF
#elif COPTERTEST == 7
#define HELI_120_CCPM
#define NANOWII
#define FORCE_ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = X; imu.accADC[PITCH] = Y; imu.accADC[YAW] = Z;}
#define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = -Y; imu.gyroADC[PITCH] = X; imu.gyroADC[YAW] = -Z;}
#define A32U4_4_HW_PWM_SERVOS
#define SERVO_RFR_RATE 200 // 200 for graupner is ok
#define SERVO_PIN5_RFR_RATE 165 // In Hz, you can set it from 20 to 400Hz, used only in HW PWM mode for mega and 32u4
#define SPEKTRUM 1024
#define BUZZER
#define RCOPTIONSBEEP // ca. 80byte
#define VBAT
#define LOG_VALUES 1
#define DISPLAY_FONT_DSIZE
#define OLED_DIGOLE
#define LCD_CONF
#define LCD_TELEMETRY
#define LCD_TELEMETRY_AUTO "1"
#define LCD_TELEMETRY_STEP "F14$5R"
#define LOG_PERMANENT
#define LOG_PERMANENT_SHOW_AFTER_CONFIG
#define SUPPRESS_OTHER_SERIAL_COMMANDS
#define SUPPRESS_DEFAULTS_FROM_GUI
#define NO_FLASH_CHECK
#define DEBUG_FREE
#elif defined(COPTERTEST)
#error "*** this test is not yet defined"
#endif
Expand Down Expand Up @@ -1956,36 +1981,49 @@

/*************** pin assignments ? ********************/
#ifdef OVERRIDE_V_BATPIN
#undef V_BATPIN
#define V_BATPIN OVERRIDE_V_BATPIN
#endif
#ifdef OVERRIDE_PSENSORPIN
#undef PSENSORPIN
#define PSENSORPIN OVERRIDE_PSENSORPIN
#endif
#ifdef OVERRIDE_LEDPIN_PINMODE
#undef LEDPIN_PINMODE
#undef LEDPIN_TOGGLE
#undef LEDPIN_OFF
#undef LEDPIN_ON
#define LEDPIN_PINMODE OVERRIDE_LEDPIN_PINMODE
#define LEDPIN_TOGGLE OVERRIDE_LEDPIN_TOGGLE
#define LEDPIN_OFF OVERRIDE_LEDPIN_OFF
#define LEDPIN_ON OVERRIDE_LEDPIN_ON
#endif
#ifdef OVERRIDE_BUZZERPIN_PINMODE
#undef BUZZERPIN_PINMODE
#undef BUZZERPIN_ON
#undef BUZZERPIN_OFF
#define BUZZERPIN_PINMODE OVERRIDE_BUZZERPIN_PINMODE
#define BUZZERPIN_ON OVERRIDE_BUZZERPIN_ON
#define BUZZERPIN_OFF OVERRIDE_BUZZERPIN_OFF
#endif

/********* sensors orientation - possibly overriding board defaults *****/
#ifdef FORCE_GYRO_ORIENTATION
#undef GYRO_ORIENTATION
#define GYRO_ORIENTATION FORCE_GYRO_ORIENTATION
#endif
#ifdef FORCE_ACC_ORIENTATION
#undef ACC_ORIENTATION
#define ACC_ORIENTATION FORCE_ACC_ORIENTATION
#endif
#ifdef FORCE_MAG_ORIENTATION
#undef MAG_ORIENTATION
#define MAG_ORIENTATION FORCE_MAG_ORIENTATION
#endif

/********* servo rates *****/
#ifdef FORCE_SERVO_RATES
#undef SERVO_RATES
#define SERVO_RATES FORCE_SERVO_RATES
#endif
/**************************************************************************************/
Expand Down

0 comments on commit f415957

Please sign in to comment.