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: F746_GUI_vV mbed Vision_Indus_IHM
Diff: main.cpp
- Revision:
- 7:5788d0406bfd
- Parent:
- 6:ea30227e7db0
- Child:
- 8:8a55f2e374da
--- a/main.cpp Tue Apr 19 13:16:07 2016 +0000
+++ b/main.cpp Thu Apr 21 01:13:45 2016 +0000
@@ -4,7 +4,7 @@
//
// GuiBase, Button, ButtonGroup, Label, NumericLabel, BlinkLabel, SeekBar
//
-// 2016/04/19, Copyright (c) 2016 MIKAMI, Naoki
+// 2016/04/21, Copyright (c) 2016 MIKAMI, Naoki
//--------------------------------------------------------------------------------
#include "NumericLabel.hpp"
@@ -33,7 +33,7 @@
Button button2(62, 50, 50, 40, "2");
const int NUMBER_BUTTONS = 4;
- const string STR1[NUMBER_BUTTONS] = {"Button1", "Button2", "Button3", "Button4"};
+ const string STR1[NUMBER_BUTTONS] = {"Button1", "Button2", "Button3", "Activate"};
ButtonGroup bGroup1(160, 50, 66, 40, NUMBER_BUTTONS, STR1, 5, 5, 3, 1,
Font12, LCD_COLOR_WHITE, 0xFF003538, 0xFFB70068, 0xFFFF7FFF);
NumericLabel<int> bTouch(234, 108, Label::LEFT, Font16, LCD_COLOR_MAGENTA);
@@ -41,6 +41,7 @@
// Control status of bGroup1
const string STR2[3] = {"0", "1", "2"};
ButtonGroup bGroup2(160, 150, 66, 40, 3, STR2, 5, 5, 3);
+ bGroup2.InactivateAll();
// Switching buttons to control barH active or inactive
const string STR3[3] = {"ON", "OFF"};
@@ -51,7 +52,7 @@
GuiBase::ENUM_TEXT, GuiBase::ENUM_BACK,
LCD_COLOR_DARKGREEN, LCD_COLOR_RED);
- // Using default value for argument (Horisontal)
+ // Using default value for argument (Horizontal)
SeekBar barH(20, 250, 200, -5, 5, 0, "-5", "", "5");
NumericLabel<float> numLabel1(80, 205, "%5.1f", barH.GetValue());
NumericLabel<int> numLabel2(130, 205, "%3d", (int)barH.GetValue());
@@ -71,6 +72,8 @@
int num;
if (bGroup1.GetTouchedNumber(num))
bTouch.Draw("Button%d touched", num+1);
+ if (num == 3)
+ bGroup2.ActivateAll();
if (bGroup2.GetTouchedNumber(num))
switch (num)