I am not a programmer but I can read code and make small changes to it. With this in mind, I back-ported some bug corrections from MultiWii_shared to the 2.3 version that I use on my Xcopter:
20131124 -------- Revision: 1631 Author: dubusal@gmail.com Date: domingo, 17 de Novembro de 2013 13:17:40 Message: - THROTTLE_ANGLE_CORRECTION correction - some timing info in the code ---- Modified : /trunk/MultiWii_shared/IMU.cpp Modified : /trunk/MultiWii_shared/MultiWii.cpp
20131230 -------- Revision: 1640 Author: dubusal@gmail.com Date: terça-feira, 24 de Dezembro de 2013 13:31:21 Message: - THROTTLE_ANGLE_CORRECTION bug correction (http://www.multiwii.com/forum/viewtopic.php?f=8&t=4433) ---- Modified : /trunk/MultiWii_shared/IMU.cpp
20140105 -------- Revision: 1630 Author: dubusal@gmail.com Date: domingo, 17 de Novembro de 2013 12:45:04 Message: - I2C GPS PID init settings (http://www.multiwii.com/forum/viewtopic.php?f=8&t=4246&start=30#p43393) ---- Modified : /trunk/MultiWii_shared/GPS.cpp
20140106 -------- Revision: 2_3_p04 Author: sismeiro@gmail.com Date: segunda-feira, 6 de Janeiro de 2014 15:15:00 Message: Correction of bug introduced with THROTTLE_ANGLE_CORRECTION port to 2_3_p03 (http://www.multiwii.com/forum/viewtopic.php?f=8&t=4482#p45176) ---- Modified : IMU.cpp
20140402 -------- Revision: 1669 Author: dubusal Date: quinta-feira, 27 de Março de 2014 23:21:51 Message: - little optimization in sensor task order switch loop ---- Modified : /trunk/MultiWii_shared/MultiWii.cpp
20140429 -------- Revision: 2_3_p06 Author: sismeiro@gmail.com Date: terça-feira, 29 de Abril de 2014 22:21:00 Message: Inclusion of buzzer alarm when arming and disarming with MOTOR_STOP option (http://www.multiwii.com/forum/viewtopic.php?f=18&t=4977&p=50075#p50075) BUZZERPIN_ON and BUZZERPIN_OFF inverted in def.h to support buzzers activated with transistor circuit ---- Modified : /trunk/MultiWii_shared/MultiWii.cpp Modified : /trunk/MultiWii_shared/def.h
20140613 -------- Revision: 2_3_p07 Author: sismeiro@gmail.com Date: terça-feira, 13 de Junho de 2014 12:20:00 Message: BUZZERPIN_PINMODE corrected for Mega boards BUZZERPIN_ON and BUZZERPIN_OFF inverted in def.h to support buzzers activated with transistor circuit with Mega boards ---- Modified : /trunk/MultiWii_shared/def.h
20140803 -------- Revision: 1687 Author: dubusal Date: sábado, 2 de Agosto de 2014 21:43:06 Message: - minor bug gps_ublox_eeprom axis_undef (http://www.multiwii.com/forum/viewtopic.php?f=8&t=5405) ---- Modified : /trunk/MultiWii_shared/GPS.cpp
I hope this changes can be useful to someone else. In attach the zip containing the changes.
I ported over my config.h settings and went to upload but your version won't compile. The following messages came up:
IMU.cpp: In function 'void getEstimatedAttitude()': IMU.cpp:243: error: 'union t_fp_vector' has no member named 'V16' IMU.cpp:243: error: 'mul' was not declared in this scope
I also tried amending the published 2.3 with just the "cosZ = mul(EstG.V16.Z , 100) / ACC_1G" correction, and it failed the same way. As I'm not a programmer I can't go any further to fix this feature and will just have to leave it disabled.
I used the config.h regression tests from 1 to 9 and all compiled without problems using the Arduino Mega board (test 3 needs more space to compile). I will check again later the changed code to see if there were any mistakes.
I corrected the bug and should compile now. It was my fault, forgot to update the variable EstG to the 2.3 version and remove the mul() function in IMU.cpp:
20140402 -------- Revision: 1669 Author: dubusal Date: quinta-feira, 27 de Março de 2014 23:21:51 Message: - little optimization in sensor task order switch loop ---- Modified : /trunk/MultiWii_shared/MultiWii.cpp
File MultiWii_2_3_p05.zip for download on the first post.
Regards, Luis Sismeiro
Last edited by sismeiro on Sun Aug 03, 2014 6:37 pm, edited 1 time in total.
20140429 -------- Revision: 2_3_p06 Author: sismeiro@gmail.com Date: terça-feira, 29 de Abril de 2014 22:21:00 Message: Inclusion of buzzer alarm when arming and disarming with MOTOR_STOP option (http://www.multiwii.com/forum/viewtopic.php?f=18&t=4977&p=50075#p50075) BUZZERPIN_ON and BUZZERPIN_OFF inverted in def.h to support buzzers activated with transistor circuit ---- Modified : /trunk/MultiWii_shared/MultiWii.cpp Modified : /trunk/MultiWii_shared/def.h
File MultiWii_2_3_p06.zip for download on the first post.
Regards, Luis Sismeiro
Last edited by sismeiro on Sun Aug 03, 2014 6:37 pm, edited 1 time in total.
20140613 -------- Revision: 2_3_p07 Author: sismeiro@gmail.com Date: terça-feira, 13 de Junho de 2014 12:20:00 Message: BUZZERPIN_PINMODE corrected for Mega boards BUZZERPIN_ON and BUZZERPIN_OFF inverted in def.h to support buzzers activated with transistor circuit with Mega boards ---- Modified : /trunk/MultiWii_shared/def.h
20140803 -------- Revision: 1687 Author: dubusal Date: sábado, 2 de Agosto de 2014 21:43:06 Message: - minor bug gps_ublox_eeprom axis_undef (http://www.multiwii.com/forum/viewtopic.php?f=8&t=5405) ---- Modified : /trunk/MultiWii_shared/GPS.cpp
File MultiWii_2_3_p07.zip for download on the first post.