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.
Gait.cpp
00001 #include "Gait.h" 00002 00003 00004 Gait::Gait(Tripod tripod_1, Tripod tripod_2) : 00005 00006 group_1(tripod_1), 00007 group_2(tripod_2) 00008 00009 { 00010 00011 } 00012 00013 void Gait::time_1(void) 00014 00015 { 00016 tripod_2_timeout.attach(this, &Gait::time_2, 0.4); 00017 group_1.gait_smooth(); 00018 00019 } 00020 00021 00022 void Gait::time_2(void) 00023 00024 { 00025 tripod_1_timeout.attach(this, &Gait::time_1, 0.4); 00026 group_2.gait_smooth(); 00027 00028 } 00029 00030 00031 void Gait::start(int group) 00032 00033 { 00034 switch(group) { 00035 case 1: 00036 tripod_1_timeout.attach(this, &Gait::time_1, 1); 00037 break; 00038 case 2: 00039 tripod_2_timeout.attach(this, &Gait::time_2, 1); 00040 break; 00041 default: 00042 break; 00043 } 00044 } 00045 00046 00047 void Gait::stop(void) 00048 00049 { 00050 00051 tripod_2_timeout.detach(); 00052 tripod_1_timeout.detach(); 00053 00054 } 00055
Generated on Tue Dec 6 2022 11:56:05 by
1.7.2