Psi Swarm robot library version 0.9
Fork of PsiSwarmV9 by
Diff: psiswarm.cpp
- Revision:
- 15:66be5ec52c3b
- Parent:
- 13:adbd827234a4
- Child:
- 16:50686c07ad07
diff -r 2f1ad77d281e -r 66be5ec52c3b psiswarm.cpp --- a/psiswarm.cpp Tue May 30 21:03:18 2017 +0000 +++ b/psiswarm.cpp Thu Jun 01 21:58:14 2017 +0000 @@ -1,6 +1,6 @@ /* University of York Robotics Laboratory PsiSwarm Library: PsiSwarm C++ Core Source File * - * Copyright 2016 University of York + * Copyright 2017 University of York * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -13,9 +13,9 @@ * (C) Dept. Electronics & Computer Science, University of York * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis * - * PsiSwarm Library Version: 0.8 + * PsiSwarm Library Version: 0.9 * - * October 2016 + * May 2017 * * */ @@ -175,6 +175,8 @@ primary_i2c.frequency(400000); serial.setup_serial_interfaces(); debug("PsiSwarm Robot Library %1.2f\n\n",SOFTWARE_VERSION_CODE); + debug("- Set up display\n"); + display.init_display_start(); debug("- Setting up serial interface\n"); debug("- Reading firmware: "); if(eprom.read_firmware() == 1) { @@ -183,13 +185,13 @@ if(use_motor_calibration){ if(!motor_calibration_set){ if(firmware_version < 1.1){ - debug("- WARNING: This firmware is incompatible with motor calibration"); - debug("- WARNING: Please update the firmware to use this feature."); + debug("- WARNING: This firmware is incompatible with motor calibration\n"); + debug("- WARNING: Please update the firmware to use this feature.\n"); use_motor_calibration = 0; } else { - debug("- WARNING: Motor calibration values have not been stored in firmware"); - debug("- WARNING: Run calibration routine to use this feature."); + debug("- WARNING: Motor calibration values have not been stored in firmware\n"); + debug("- WARNING: Run calibration routine to use this feature.\n"); use_motor_calibration = 0; } } @@ -244,15 +246,16 @@ } char demo_on = 0; if(ENABLE_DEMO == 1 && switchstate > 0) demo_on=1; - display.init_display(demo_on); + display.init_display_end(demo_on); event_handler.attach_us(this,&Psiswarm::IF_handle_events, 1000); if(demo_on > 0) { debug("- Demo mode button is pressed\n"); - wait(1.0); + wait(0.6); demo_on = i2c_setup.IF_get_switch_state(); if(demo_on > 0) demo.start_demo_mode(); - display.init_display(0); + display.init_display_end(0); } + debug("___________________________________________________"); } void Psiswarm::IF_update_minutes()