Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed lib_workshop_2019
src/console_output.cpp
- Committer:
- gvaquette
- Date:
- 2019-10-23
- Revision:
- 4:bf5caf4c0c88
- Parent:
- 3:a0e37b8918ac
File content as of revision 4:bf5caf4c0c88:
#include "mbed.h"
#include "console_output.h"
void ft_print_test_menu(Serial &Pc)
{
Pc.printf ("\n\n\n\n\rTesting program \n\n\r Which test do you want to perform ?\n\n");
Pc.printf ("\r%d- Ultrasonic sensors (all of them)\n", ULTRASONIC);
Pc.printf ("\r%d- Compass and I2C\n", COMPASS);
Pc.printf ("\r%d- CNY70 (all of them) \n",CNY70);
Pc.printf ("\r%d- VBAT \t! Wrong voltage !\n",VBAT);
Pc.printf ("\r%d- Left motor\n", LEFT_MOTOR);
Pc.printf ("\r%d- MRight motor \n", RIGHT_MOTOR);
Pc.printf ("\r%d- PIXY (CMUCAM5)\n", PIXY);
}
e_test ft_get_user_choice(Serial &pc)
{
e_test user_choice = (e_test) (pc.getc() -'0');
return user_choice;
}
int ft_get_user_int(Serial &pc)
{
int user_int = (e_test) (pc.getc() -'0');
if (user_int > 9 || user_int < 0)
return -1;
else
return user_int;
}
void ft_print_to_be_imp(Serial &pc)
{
printf("\rTo be implemented");
}