CONFIG_MODULE_FIXED_POINT=y
CONFIG_MODULE_VECT2=y
CONFIG_MODULE_GEOMETRY=y
+# CONFIG_MODULE_HOSTSIM is not set
CONFIG_MODULE_SCHEDULER=y
CONFIG_MODULE_SCHEDULER_STATS=y
# CONFIG_MODULE_SCHEDULER_CREATE_CONFIG is not set
# CONFIG_MODULE_ENCODERS_SPI_CREATE_CONFIG is not set
#
-# Robot specific modules
+# Robot specific modules (fixed point lib may be needed)
#
CONFIG_MODULE_ROBOT_SYSTEM=y
+# CONFIG_MODULE_ROBOT_SYSTEM_USE_F64 is not set
# CONFIG_MODULE_ROBOT_SYSTEM_MOT_AND_EXT is not set
CONFIG_MODULE_POSITION_MANAGER=y
CONFIG_MODULE_COMPENSATE_CENTRIFUGAL_FORCE=y
#include <pwm_ng.h>
#include <timer.h>
#include <scheduler.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
static volatile uint8_t fessor_state = OFF;
static volatile uint32_t fessor_pos_up = 35000;
-static volatile uint32_t fessor_pos_down = 63500;
+static volatile uint32_t fessor_pos_down = 0;
static volatile uint32_t fessor_delay_up = 500;
static volatile uint32_t fessor_delay_down = 2000;
static volatile uint32_t delay = 0;
#include <rdline.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
#include <ax12.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <encoders_microb.h>
#include <adc.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <encoders_microb.h>
#include <pid.h>
#include <pwm_ng.h>
#include <timer.h>
#include <scheduler.h>
-#include <time.h>
+#include <clock_time.h>
#include <adc.h>
#include <pid.h>
cs_manage(&mainboard.angle.cs);
if (mainboard.distance.on)
cs_manage(&mainboard.distance.cs);
- if (mainboard.fessor.on)
+ if (mainboard.fessor.on) {
cs_manage(&mainboard.fessor.cs);
+ fessor_manage();
+ }
if (mainboard.wheel.on)
cs_manage(&mainboard.wheel.cs);
- if (mainboard.elevator.on)
+ if (mainboard.elevator.on) {
cs_manage(&mainboard.elevator.cs);
-
- fessor_manage();
- elevator_manage();
+ elevator_manage();
+ }
}
if ((cpt & 1) && (mainboard.flags & DO_POS)) {
/* about 1.5ms (worst case without centrifugal force
mainboard.angle.on = 0;
mainboard.distance.on = 0;
mainboard.fessor.on = 1;
- mainboard.elevator.on = 1;
+ mainboard.elevator.on = 0;
mainboard.wheel.on = 1;
mainboard.flags |= DO_CS;
#include <pwm_ng.h>
#include <timer.h>
#include <scheduler.h>
-#include <time.h>
+#include <clock_time.h>
#include <adc.h>
#include <pid.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
#include <uart.h>
#include <pwm_ng.h>
-#include <time.h>
+#include <clock_time.h>
#include <pid.h>
#include <quadramp.h>
return a;
}
-/** do a modulo 2.pi -> [-Pi,+Pi], knowing that 'a' is in [-3Pi,+3Pi] */
-double simple_modulo_2pi(double a)
-{
- if (a < -M_PI) {
- a += M_2PI;
- }
- else if (a > M_PI) {
- a -= M_2PI;
- }
- return a;
-}
+/* /\** do a modulo 2.pi -> [-Pi,+Pi], knowing that 'a' is in [-3Pi,+3Pi] *\/ */
+/* double simple_modulo_2pi(double a) */
+/* { */
+/* if (a < -M_PI) { */
+/* a += M_2PI; */
+/* } */
+/* else if (a > M_PI) { */
+/* a -= M_2PI; */
+/* } */
+/* return a; */
+/* } */
/* return the distance to a point in the area */
int16_t angle_abs_to_rel(int16_t a_abs)