BikeSpdCadDisplay.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. /*
  2. This software is subject to the license described in the License.txt file
  3. included with this software distribution. You may not use this file except in compliance
  4. with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2012
  6. All rights reserved.
  7. */
  8. #pragma once
  9. #include "StdAfx.h"
  10. #include "ISimBase.h"
  11. #include "bsc.h"
  12. #include "types.h"
  13. #include "antdefines.h"
  14. using namespace System;
  15. using namespace System::ComponentModel;
  16. using namespace System::Collections;
  17. using namespace System::Windows::Forms;
  18. using namespace System::Data;
  19. using namespace System::Drawing;
  20. public ref class BikeSpdCadDisplay : public System::Windows::Forms::Form, public ISimBase{
  21. public:
  22. BikeSpdCadDisplay(){
  23. InitializeComponent();
  24. InitializeSim();
  25. }
  26. ~BikeSpdCadDisplay(){
  27. this->panel_Display->Controls->Clear();
  28. this->panel_Settings->Controls->Clear();
  29. delete this->panel_Display;
  30. delete this->panel_Settings;
  31. //clean up floating resources with the garbage collector
  32. GC::Collect(2);
  33. if (components)
  34. {
  35. delete components;
  36. }
  37. }
  38. public:
  39. virtual void ANT_eventNotification(UCHAR ucEventCode_, UCHAR* pucEventBuffer_);
  40. virtual UCHAR getDeviceType(){return BSC_DEVICE_TYPE;}
  41. virtual UCHAR getTransmissionType(){return 0;} // Transmission type wildcarded to ensure future compatibility
  42. virtual USHORT getTransmitPeriod(){return BSC_MSG_PERIOD;}
  43. virtual DOUBLE getTimerInterval(){return 3600000;} // Set interval to one hour, so timer events are not frequent (timer should be disabled tho)
  44. virtual void onTimerTock(USHORT eventTime){} // Do nothing
  45. virtual System::Windows::Forms::Panel^ getSimSettingsPanel(){return this->panel_Settings;}
  46. virtual System::Windows::Forms::Panel^ getSimTranslatedDisplay(){return this->panel_Display;}
  47. private:
  48. void InitializeSim();
  49. void HandleReceive(UCHAR* pucRxBuffer_);
  50. void UpdateDisplay();
  51. System::Void numericUpDown_Sim_WheelCircumference_ValueChanged(System::Object^ sender, System::EventArgs^ e);
  52. private:
  53. // Implementation specific constants
  54. static const UCHAR MAX_NO_EVENTS = 12; // Maximum number of messages with no new events to detect stopping/coasting
  55. // Simulator variables
  56. BSCState eState; // Simulator state
  57. BOOL bCoast; // Coasting flag
  58. BOOL bStop; // Stopping flag
  59. // Cadence
  60. USHORT usCadEventCount; // Bike cadence event count (pedal revolutions)
  61. USHORT usCadPreviousEventCount; // Bike cadence previous event count
  62. USHORT usCadTime1024; // Time of last bike cadence event (1/1024s)
  63. USHORT usCadPreviousTime1024; // Time of previous bike cadence event (1/1024s)
  64. ULONG ulCadAcumEventCount; // Cumulative bike cadence event count (pedal revolutions)
  65. ULONG ulCadAcumTime1024; // Cumulative time (1/1024 seconds)
  66. UCHAR ucCadence; // Calculated cadence (rpm)
  67. // Speed
  68. USHORT usSpdEventCount; // Bike speed event count (wheel revolutions)
  69. USHORT usSpdPreviousEventCount; // Bike speed previous event count
  70. USHORT usSpdTime1024; // Time of last bike speed event (1/1024s)
  71. USHORT usSpdPreviousTime1024; // Time of previous bike speed event (1/1024s)
  72. ULONG ulSpdAcumEventCount; // Cumulative bike speed event count (wheel revolutions)
  73. ULONG ulSpdAcumTime1024; // Cumulative time (1/1024 seconds)
  74. ULONG ulSpeed; // Instantaneous speed (meters/h)
  75. ULONG ulDistance; // Cumulative distance (cm)
  76. UCHAR ucWheelCircumference; // Wheel circumference (cm)
  77. private: System::Windows::Forms::Panel^ panel_Display;
  78. private: System::Windows::Forms::Label^ label_Trn_Title;
  79. private: System::Windows::Forms::Label^ label_Trn_Speed;
  80. private: System::Windows::Forms::Label^ label_Trn_Cadence;
  81. private: System::Windows::Forms::Label^ label_Trn_SpeedTimeDisplay;
  82. private: System::Windows::Forms::Label^ label_Trn_CadenceTimeDisplay;
  83. private: System::Windows::Forms::Label^ label_Trn_Time;
  84. private: System::Windows::Forms::Label^ label_Trn_SpdCountDisplay;
  85. private: System::Windows::Forms::Label^ label_Trn_CadCountDisplay;
  86. private: System::Windows::Forms::Label^ label_Trn_Count;
  87. private: System::Windows::Forms::Label^ label_Trn_TimeUnit;
  88. private: System::Windows::Forms::Panel^ panel_Settings;
  89. private: System::Windows::Forms::GroupBox^ groupBox_CalculatedData;
  90. private: System::Windows::Forms::Label^ label_Calc_Cadence;
  91. private: System::Windows::Forms::Label^ label_Calc_CadenceDisplay;
  92. private: System::Windows::Forms::Label^ label_Calc_CadEventCountDisplay;
  93. private: System::Windows::Forms::Label^ label_Calc_CadEventCount;
  94. private: System::Windows::Forms::Label^ label_Calc_ElapsedSecsDisplay;
  95. private: System::Windows::Forms::Label^ label_Calc_ElpTime;
  96. private: System::Windows::Forms::Label^ label_Calc_Speed;
  97. private: System::Windows::Forms::Label^ label_Calc_SpeedDisplay;
  98. private: System::Windows::Forms::Label^ label_Calc_SpdEventCountDisplay;
  99. private: System::Windows::Forms::Label^ label_Calc_SpdEventCount;
  100. private: System::Windows::Forms::NumericUpDown^ numericUpDown_Sim_WheelCircumference;
  101. private: System::Windows::Forms::Label^ label_Sim_WheelCircumferenceConst;
  102. private: System::Windows::Forms::Label^ label_Calc_DistanceDisplay;
  103. private: System::Windows::Forms::Label^ label2;
  104. private: System::Windows::Forms::Label^ label_Coasting;
  105. private: System::Windows::Forms::Label^ label_Stopped;
  106. private:
  107. /// <summary>
  108. /// Required designer variable.
  109. /// </summary>
  110. System::ComponentModel::Container ^components;
  111. #pragma region Windows Form Designer generated code
  112. /// <summary>
  113. /// Required method for Designer support - do not modify
  114. /// the contents of this method with the code editor.
  115. /// </summary>
  116. void InitializeComponent(void)
  117. {
  118. this->panel_Display = (gcnew System::Windows::Forms::Panel());
  119. this->label_Trn_TimeUnit = (gcnew System::Windows::Forms::Label());
  120. this->label_Trn_SpdCountDisplay = (gcnew System::Windows::Forms::Label());
  121. this->label_Trn_CadCountDisplay = (gcnew System::Windows::Forms::Label());
  122. this->label_Trn_Cadence = (gcnew System::Windows::Forms::Label());
  123. this->label_Trn_Count = (gcnew System::Windows::Forms::Label());
  124. this->label_Trn_Speed = (gcnew System::Windows::Forms::Label());
  125. this->label_Trn_SpeedTimeDisplay = (gcnew System::Windows::Forms::Label());
  126. this->label_Trn_CadenceTimeDisplay = (gcnew System::Windows::Forms::Label());
  127. this->label_Trn_Time = (gcnew System::Windows::Forms::Label());
  128. this->label_Trn_Title = (gcnew System::Windows::Forms::Label());
  129. this->panel_Settings = (gcnew System::Windows::Forms::Panel());
  130. this->numericUpDown_Sim_WheelCircumference = (gcnew System::Windows::Forms::NumericUpDown());
  131. this->label_Sim_WheelCircumferenceConst = (gcnew System::Windows::Forms::Label());
  132. this->groupBox_CalculatedData = (gcnew System::Windows::Forms::GroupBox());
  133. this->label_Stopped = (gcnew System::Windows::Forms::Label());
  134. this->label_Coasting = (gcnew System::Windows::Forms::Label());
  135. this->label_Calc_DistanceDisplay = (gcnew System::Windows::Forms::Label());
  136. this->label2 = (gcnew System::Windows::Forms::Label());
  137. this->label_Calc_Speed = (gcnew System::Windows::Forms::Label());
  138. this->label_Calc_SpeedDisplay = (gcnew System::Windows::Forms::Label());
  139. this->label_Calc_SpdEventCountDisplay = (gcnew System::Windows::Forms::Label());
  140. this->label_Calc_SpdEventCount = (gcnew System::Windows::Forms::Label());
  141. this->label_Calc_Cadence = (gcnew System::Windows::Forms::Label());
  142. this->label_Calc_CadenceDisplay = (gcnew System::Windows::Forms::Label());
  143. this->label_Calc_CadEventCountDisplay = (gcnew System::Windows::Forms::Label());
  144. this->label_Calc_CadEventCount = (gcnew System::Windows::Forms::Label());
  145. this->label_Calc_ElapsedSecsDisplay = (gcnew System::Windows::Forms::Label());
  146. this->label_Calc_ElpTime = (gcnew System::Windows::Forms::Label());
  147. this->panel_Display->SuspendLayout();
  148. this->panel_Settings->SuspendLayout();
  149. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Sim_WheelCircumference))->BeginInit();
  150. this->groupBox_CalculatedData->SuspendLayout();
  151. this->SuspendLayout();
  152. //
  153. // panel_Display
  154. //
  155. this->panel_Display->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
  156. this->panel_Display->Controls->Add(this->label_Trn_TimeUnit);
  157. this->panel_Display->Controls->Add(this->label_Trn_SpdCountDisplay);
  158. this->panel_Display->Controls->Add(this->label_Trn_CadCountDisplay);
  159. this->panel_Display->Controls->Add(this->label_Trn_Cadence);
  160. this->panel_Display->Controls->Add(this->label_Trn_Count);
  161. this->panel_Display->Controls->Add(this->label_Trn_Speed);
  162. this->panel_Display->Controls->Add(this->label_Trn_SpeedTimeDisplay);
  163. this->panel_Display->Controls->Add(this->label_Trn_CadenceTimeDisplay);
  164. this->panel_Display->Controls->Add(this->label_Trn_Time);
  165. this->panel_Display->Controls->Add(this->label_Trn_Title);
  166. this->panel_Display->Location = System::Drawing::Point(58, 188);
  167. this->panel_Display->Name = L"panel_Display";
  168. this->panel_Display->Size = System::Drawing::Size(200, 90);
  169. this->panel_Display->TabIndex = 1;
  170. //
  171. // label_Trn_TimeUnit
  172. //
  173. this->label_Trn_TimeUnit->AutoSize = true;
  174. this->label_Trn_TimeUnit->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 6.25F, System::Drawing::FontStyle::Regular,
  175. System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
  176. this->label_Trn_TimeUnit->Location = System::Drawing::Point(142, 26);
  177. this->label_Trn_TimeUnit->Name = L"label_Trn_TimeUnit";
  178. this->label_Trn_TimeUnit->Size = System::Drawing::Size(44, 12);
  179. this->label_Trn_TimeUnit->TabIndex = 11;
  180. this->label_Trn_TimeUnit->Text = L"(1/1024s)";
  181. //
  182. // label_Trn_SpdCountDisplay
  183. //
  184. this->label_Trn_SpdCountDisplay->AutoSize = true;
  185. this->label_Trn_SpdCountDisplay->Location = System::Drawing::Point(72, 62);
  186. this->label_Trn_SpdCountDisplay->Name = L"label_Trn_SpdCountDisplay";
  187. this->label_Trn_SpdCountDisplay->Size = System::Drawing::Size(16, 13);
  188. this->label_Trn_SpdCountDisplay->TabIndex = 10;
  189. this->label_Trn_SpdCountDisplay->Text = L"---";
  190. //
  191. // label_Trn_CadCountDisplay
  192. //
  193. this->label_Trn_CadCountDisplay->AutoSize = true;
  194. this->label_Trn_CadCountDisplay->Location = System::Drawing::Point(72, 44);
  195. this->label_Trn_CadCountDisplay->Name = L"label_Trn_CadCountDisplay";
  196. this->label_Trn_CadCountDisplay->Size = System::Drawing::Size(16, 13);
  197. this->label_Trn_CadCountDisplay->TabIndex = 9;
  198. this->label_Trn_CadCountDisplay->Text = L"---";
  199. //
  200. // label_Trn_Cadence
  201. //
  202. this->label_Trn_Cadence->AutoSize = true;
  203. this->label_Trn_Cadence->Location = System::Drawing::Point(13, 44);
  204. this->label_Trn_Cadence->Name = L"label_Trn_Cadence";
  205. this->label_Trn_Cadence->Size = System::Drawing::Size(53, 13);
  206. this->label_Trn_Cadence->TabIndex = 0;
  207. this->label_Trn_Cadence->Text = L"Cadence:";
  208. //
  209. // label_Trn_Count
  210. //
  211. this->label_Trn_Count->AutoSize = true;
  212. this->label_Trn_Count->Location = System::Drawing::Point(67, 26);
  213. this->label_Trn_Count->Name = L"label_Trn_Count";
  214. this->label_Trn_Count->Size = System::Drawing::Size(38, 13);
  215. this->label_Trn_Count->TabIndex = 8;
  216. this->label_Trn_Count->Text = L"Count:";
  217. //
  218. // label_Trn_Speed
  219. //
  220. this->label_Trn_Speed->AutoSize = true;
  221. this->label_Trn_Speed->Location = System::Drawing::Point(25, 62);
  222. this->label_Trn_Speed->Name = L"label_Trn_Speed";
  223. this->label_Trn_Speed->Size = System::Drawing::Size(41, 13);
  224. this->label_Trn_Speed->TabIndex = 2;
  225. this->label_Trn_Speed->Text = L"Speed:";
  226. //
  227. // label_Trn_SpeedTimeDisplay
  228. //
  229. this->label_Trn_SpeedTimeDisplay->AutoSize = true;
  230. this->label_Trn_SpeedTimeDisplay->Location = System::Drawing::Point(114, 62);
  231. this->label_Trn_SpeedTimeDisplay->Name = L"label_Trn_SpeedTimeDisplay";
  232. this->label_Trn_SpeedTimeDisplay->Size = System::Drawing::Size(16, 13);
  233. this->label_Trn_SpeedTimeDisplay->TabIndex = 7;
  234. this->label_Trn_SpeedTimeDisplay->Text = L"---";
  235. //
  236. // label_Trn_CadenceTimeDisplay
  237. //
  238. this->label_Trn_CadenceTimeDisplay->AutoSize = true;
  239. this->label_Trn_CadenceTimeDisplay->Location = System::Drawing::Point(114, 44);
  240. this->label_Trn_CadenceTimeDisplay->Name = L"label_Trn_CadenceTimeDisplay";
  241. this->label_Trn_CadenceTimeDisplay->Size = System::Drawing::Size(16, 13);
  242. this->label_Trn_CadenceTimeDisplay->TabIndex = 6;
  243. this->label_Trn_CadenceTimeDisplay->Text = L"---";
  244. //
  245. // label_Trn_Time
  246. //
  247. this->label_Trn_Time->AutoSize = true;
  248. this->label_Trn_Time->Location = System::Drawing::Point(110, 26);
  249. this->label_Trn_Time->Name = L"label_Trn_Time";
  250. this->label_Trn_Time->Size = System::Drawing::Size(33, 13);
  251. this->label_Trn_Time->TabIndex = 5;
  252. this->label_Trn_Time->Text = L"Time:";
  253. //
  254. // label_Trn_Title
  255. //
  256. this->label_Trn_Title->AutoSize = true;
  257. this->label_Trn_Title->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Underline,
  258. System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
  259. this->label_Trn_Title->Location = System::Drawing::Point(2, 2);
  260. this->label_Trn_Title->Name = L"label_Trn_Title";
  261. this->label_Trn_Title->Size = System::Drawing::Size(160, 13);
  262. this->label_Trn_Title->TabIndex = 4;
  263. this->label_Trn_Title->Text = L"Current Speed and Cadence Tx:";
  264. //
  265. // panel_Settings
  266. //
  267. this->panel_Settings->Controls->Add(this->numericUpDown_Sim_WheelCircumference);
  268. this->panel_Settings->Controls->Add(this->label_Sim_WheelCircumferenceConst);
  269. this->panel_Settings->Controls->Add(this->groupBox_CalculatedData);
  270. this->panel_Settings->Location = System::Drawing::Point(322, 50);
  271. this->panel_Settings->Name = L"panel_Settings";
  272. this->panel_Settings->Size = System::Drawing::Size(400, 140);
  273. this->panel_Settings->TabIndex = 2;
  274. //
  275. // numericUpDown_Sim_WheelCircumference
  276. //
  277. this->numericUpDown_Sim_WheelCircumference->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 0});
  278. this->numericUpDown_Sim_WheelCircumference->Location = System::Drawing::Point(332, 115);
  279. this->numericUpDown_Sim_WheelCircumference->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {500, 0, 0, 0});
  280. this->numericUpDown_Sim_WheelCircumference->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
  281. this->numericUpDown_Sim_WheelCircumference->Name = L"numericUpDown_Sim_WheelCircumference";
  282. this->numericUpDown_Sim_WheelCircumference->Size = System::Drawing::Size(47, 20);
  283. this->numericUpDown_Sim_WheelCircumference->TabIndex = 56;
  284. this->numericUpDown_Sim_WheelCircumference->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {207, 0, 0, 0});
  285. this->numericUpDown_Sim_WheelCircumference->ValueChanged += gcnew System::EventHandler(this, &BikeSpdCadDisplay::numericUpDown_Sim_WheelCircumference_ValueChanged);
  286. //
  287. // label_Sim_WheelCircumferenceConst
  288. //
  289. this->label_Sim_WheelCircumferenceConst->AutoSize = true;
  290. this->label_Sim_WheelCircumferenceConst->Location = System::Drawing::Point(197, 117);
  291. this->label_Sim_WheelCircumferenceConst->Name = L"label_Sim_WheelCircumferenceConst";
  292. this->label_Sim_WheelCircumferenceConst->Size = System::Drawing::Size(132, 13);
  293. this->label_Sim_WheelCircumferenceConst->TabIndex = 57;
  294. this->label_Sim_WheelCircumferenceConst->Text = L"Wheel Circumference (cm)";
  295. //
  296. // groupBox_CalculatedData
  297. //
  298. this->groupBox_CalculatedData->Controls->Add(this->label_Stopped);
  299. this->groupBox_CalculatedData->Controls->Add(this->label_Coasting);
  300. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_DistanceDisplay);
  301. this->groupBox_CalculatedData->Controls->Add(this->label2);
  302. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_Speed);
  303. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_SpeedDisplay);
  304. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_SpdEventCountDisplay);
  305. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_SpdEventCount);
  306. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_Cadence);
  307. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_CadenceDisplay);
  308. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_CadEventCountDisplay);
  309. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_CadEventCount);
  310. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_ElapsedSecsDisplay);
  311. this->groupBox_CalculatedData->Controls->Add(this->label_Calc_ElpTime);
  312. this->groupBox_CalculatedData->Location = System::Drawing::Point(3, 3);
  313. this->groupBox_CalculatedData->Name = L"groupBox_CalculatedData";
  314. this->groupBox_CalculatedData->Size = System::Drawing::Size(394, 109);
  315. this->groupBox_CalculatedData->TabIndex = 17;
  316. this->groupBox_CalculatedData->TabStop = false;
  317. this->groupBox_CalculatedData->Text = L"Calculated Data";
  318. //
  319. // label_Stopped
  320. //
  321. this->label_Stopped->AutoSize = true;
  322. this->label_Stopped->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  323. static_cast<System::Byte>(0)));
  324. this->label_Stopped->ForeColor = System::Drawing::Color::Red;
  325. this->label_Stopped->Location = System::Drawing::Point(322, 16);
  326. this->label_Stopped->Name = L"label_Stopped";
  327. this->label_Stopped->Size = System::Drawing::Size(54, 13);
  328. this->label_Stopped->TabIndex = 20;
  329. this->label_Stopped->Text = L"Stopped";
  330. //
  331. // label_Coasting
  332. //
  333. this->label_Coasting->AutoSize = true;
  334. this->label_Coasting->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
  335. static_cast<System::Byte>(0)));
  336. this->label_Coasting->ForeColor = System::Drawing::Color::Red;
  337. this->label_Coasting->Location = System::Drawing::Point(129, 16);
  338. this->label_Coasting->Name = L"label_Coasting";
  339. this->label_Coasting->Size = System::Drawing::Size(56, 13);
  340. this->label_Coasting->TabIndex = 22;
  341. this->label_Coasting->Text = L"Coasting";
  342. //
  343. // label_Calc_DistanceDisplay
  344. //
  345. this->label_Calc_DistanceDisplay->AutoSize = true;
  346. this->label_Calc_DistanceDisplay->Location = System::Drawing::Point(322, 83);
  347. this->label_Calc_DistanceDisplay->Name = L"label_Calc_DistanceDisplay";
  348. this->label_Calc_DistanceDisplay->Size = System::Drawing::Size(16, 13);
  349. this->label_Calc_DistanceDisplay->TabIndex = 15;
  350. this->label_Calc_DistanceDisplay->Text = L"---";
  351. //
  352. // label2
  353. //
  354. this->label2->AutoSize = true;
  355. this->label2->Location = System::Drawing::Point(241, 83);
  356. this->label2->Name = L"label2";
  357. this->label2->Size = System::Drawing::Size(75, 13);
  358. this->label2->TabIndex = 14;
  359. this->label2->Text = L"Distance (km):";
  360. //
  361. // label_Calc_Speed
  362. //
  363. this->label_Calc_Speed->AutoSize = true;
  364. this->label_Calc_Speed->Location = System::Drawing::Point(248, 37);
  365. this->label_Calc_Speed->Name = L"label_Calc_Speed";
  366. this->label_Calc_Speed->Size = System::Drawing::Size(68, 13);
  367. this->label_Calc_Speed->TabIndex = 11;
  368. this->label_Calc_Speed->Text = L"Speed (kph):";
  369. //
  370. // label_Calc_SpeedDisplay
  371. //
  372. this->label_Calc_SpeedDisplay->AutoSize = true;
  373. this->label_Calc_SpeedDisplay->Location = System::Drawing::Point(322, 37);
  374. this->label_Calc_SpeedDisplay->Name = L"label_Calc_SpeedDisplay";
  375. this->label_Calc_SpeedDisplay->Size = System::Drawing::Size(16, 13);
  376. this->label_Calc_SpeedDisplay->TabIndex = 13;
  377. this->label_Calc_SpeedDisplay->Text = L"---";
  378. //
  379. // label_Calc_SpdEventCountDisplay
  380. //
  381. this->label_Calc_SpdEventCountDisplay->AutoSize = true;
  382. this->label_Calc_SpdEventCountDisplay->Location = System::Drawing::Point(322, 62);
  383. this->label_Calc_SpdEventCountDisplay->Name = L"label_Calc_SpdEventCountDisplay";
  384. this->label_Calc_SpdEventCountDisplay->Size = System::Drawing::Size(16, 13);
  385. this->label_Calc_SpdEventCountDisplay->TabIndex = 12;
  386. this->label_Calc_SpdEventCountDisplay->Text = L"---";
  387. //
  388. // label_Calc_SpdEventCount
  389. //
  390. this->label_Calc_SpdEventCount->AutoSize = true;
  391. this->label_Calc_SpdEventCount->Location = System::Drawing::Point(213, 62);
  392. this->label_Calc_SpdEventCount->Name = L"label_Calc_SpdEventCount";
  393. this->label_Calc_SpdEventCount->Size = System::Drawing::Size(103, 13);
  394. this->label_Calc_SpdEventCount->TabIndex = 9;
  395. this->label_Calc_SpdEventCount->Text = L"Speed Event Count:";
  396. //
  397. // label_Calc_Cadence
  398. //
  399. this->label_Calc_Cadence->AutoSize = true;
  400. this->label_Calc_Cadence->Location = System::Drawing::Point(37, 37);
  401. this->label_Calc_Cadence->Name = L"label_Calc_Cadence";
  402. this->label_Calc_Cadence->Size = System::Drawing::Size(86, 13);
  403. this->label_Calc_Cadence->TabIndex = 1;
  404. this->label_Calc_Cadence->Text = L"Cadence (RPM):";
  405. //
  406. // label_Calc_CadenceDisplay
  407. //
  408. this->label_Calc_CadenceDisplay->AutoSize = true;
  409. this->label_Calc_CadenceDisplay->Location = System::Drawing::Point(129, 37);
  410. this->label_Calc_CadenceDisplay->Name = L"label_Calc_CadenceDisplay";
  411. this->label_Calc_CadenceDisplay->Size = System::Drawing::Size(16, 13);
  412. this->label_Calc_CadenceDisplay->TabIndex = 3;
  413. this->label_Calc_CadenceDisplay->Text = L"---";
  414. //
  415. // label_Calc_CadEventCountDisplay
  416. //
  417. this->label_Calc_CadEventCountDisplay->AutoSize = true;
  418. this->label_Calc_CadEventCountDisplay->Location = System::Drawing::Point(129, 62);
  419. this->label_Calc_CadEventCountDisplay->Name = L"label_Calc_CadEventCountDisplay";
  420. this->label_Calc_CadEventCountDisplay->Size = System::Drawing::Size(16, 13);
  421. this->label_Calc_CadEventCountDisplay->TabIndex = 2;
  422. this->label_Calc_CadEventCountDisplay->Text = L"---";
  423. //
  424. // label_Calc_CadEventCount
  425. //
  426. this->label_Calc_CadEventCount->AutoSize = true;
  427. this->label_Calc_CadEventCount->Location = System::Drawing::Point(8, 62);
  428. this->label_Calc_CadEventCount->Name = L"label_Calc_CadEventCount";
  429. this->label_Calc_CadEventCount->Size = System::Drawing::Size(115, 13);
  430. this->label_Calc_CadEventCount->TabIndex = 0;
  431. this->label_Calc_CadEventCount->Text = L"Cadence Event Count:";
  432. //
  433. // label_Calc_ElapsedSecsDisplay
  434. //
  435. this->label_Calc_ElapsedSecsDisplay->AutoSize = true;
  436. this->label_Calc_ElapsedSecsDisplay->Location = System::Drawing::Point(129, 83);
  437. this->label_Calc_ElapsedSecsDisplay->Name = L"label_Calc_ElapsedSecsDisplay";
  438. this->label_Calc_ElapsedSecsDisplay->Size = System::Drawing::Size(16, 13);
  439. this->label_Calc_ElapsedSecsDisplay->TabIndex = 7;
  440. this->label_Calc_ElapsedSecsDisplay->Text = L"---";
  441. //
  442. // label_Calc_ElpTime
  443. //
  444. this->label_Calc_ElpTime->AutoSize = true;
  445. this->label_Calc_ElpTime->Location = System::Drawing::Point(8, 83);
  446. this->label_Calc_ElpTime->Name = L"label_Calc_ElpTime";
  447. this->label_Calc_ElpTime->Size = System::Drawing::Size(115, 13);
  448. this->label_Calc_ElpTime->TabIndex = 0;
  449. this->label_Calc_ElpTime->Text = L"Total Elapsed Time (s):";
  450. //
  451. // BikeSpdCadDisplay
  452. //
  453. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  454. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  455. this->ClientSize = System::Drawing::Size(786, 317);
  456. this->Controls->Add(this->panel_Settings);
  457. this->Controls->Add(this->panel_Display);
  458. this->Name = L"BikeSpdCadDisplay";
  459. this->Text = L"Bike Speed and Cadence Simulator";
  460. this->panel_Display->ResumeLayout(false);
  461. this->panel_Display->PerformLayout();
  462. this->panel_Settings->ResumeLayout(false);
  463. this->panel_Settings->PerformLayout();
  464. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Sim_WheelCircumference))->EndInit();
  465. this->groupBox_CalculatedData->ResumeLayout(false);
  466. this->groupBox_CalculatedData->PerformLayout();
  467. this->ResumeLayout(false);
  468. }
  469. #pragma endregion
  470. };