#ifndef WBC_DRAW_H #define WBC_DRAW_H #include struct Servos { uint16_t left_servo; uint16_t right_servo; uint8_t lift_servo; }; struct Draw { uint8_t start_writing; uint8_t shapenrs[5]; uint8_t state; uint8_t index; uint8_t delay; uint8_t moving; double offset_x; double offset_y; double x; double y; union { struct { double start_x; double start_y; double diff_x; double diff_y; double factor; double factor_inc; } line; struct { double m_x; double m_y; double r_x; double r_y; double a_cur; double a_inc; double a_end; } circle; } move; void init(); void draw( uint8_t hours, uint8_t minutes, Servos& servos ); void calc_cleaning(); void next_shape( Servos& servos ); void calc_offset(); bool stopped(); static Draw singleton; }; #endif // WBC_DRAW_H