From bcee0d3219e9034d8cb6fdfafbe483d684f11016 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 10 May 2013 00:53:51 +0200 Subject: digital/io-hub/src/apbirthday: send informations to LCD --- digital/io-hub/src/apbirthday/robot.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'digital/io-hub/src/apbirthday/robot.cc') diff --git a/digital/io-hub/src/apbirthday/robot.cc b/digital/io-hub/src/apbirthday/robot.cc index 64f2c93f..f99351dc 100644 --- a/digital/io-hub/src/apbirthday/robot.cc +++ b/digital/io-hub/src/apbirthday/robot.cc @@ -72,7 +72,8 @@ Robot::Robot () stats_proto_ (0), stats_asserv_ (0), stats_beacon_ (0), stats_chrono_ (false), stats_chrono_last_s_ (-1), - stats_inputs_ (0), stats_usdist_ (0), stats_cake_ (0), stats_pressure_ (0), stats_rgb_ (0) + stats_inputs_ (0), stats_usdist_ (0), stats_cake_ (0), stats_pressure_ (0), stats_rgb_ (0), + lcd_send_position_cpt_ (1) { robot = this; // Fill I/O arrays. @@ -169,8 +170,14 @@ Robot::main_loop () zb_i2c_queue_.sync (); if (!ended) { + lcd.chrono (chrono.remaining_time_ms () / 1000); Position robot_pos = asserv.get_position (); beacon.send_position (robot_pos.v); + if (!--lcd_send_position_cpt_) + { + lcd.robot_position (robot_pos); + lcd_send_position_cpt_ = 125; + } // Look for obstacles. for (int i = 0; i < Beacon::pos_nb; i++) { -- cgit v1.2.3