• R/O
  • SSH
  • HTTPS

team-ncxx-sl: Commit


Commit MetaInfo

Revision420 (tree)
Zeit2019-07-06 17:40:35
Autormizutani-f

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/LookupGate.cpp (revision 419)
+++ trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/LookupGate.cpp (revision 420)
@@ -16,7 +16,7 @@
1616
1717 LookupGate::~LookupGate() {
1818 }
19-const signed int standTailAngle = 84;
19+const signed int standTailAngle = 82;
2020 const signed int interval1stTailAngle = 78;
2121 const signed int interval2ndTailAngle = 72;
2222 //const signed int interval3ndTailAngle = 68;
@@ -469,6 +469,16 @@
469469 }
470470 }
471471
472+void LookupGate::updatePidValue() {
473+
474+ const signed int LIGHT_WHITE2 = 48;
475+ const signed int LIGHT_BLACK2 = 0;
476+
477+ // 黒と白の中間を走るPID制御を実施
478+ PIDMgr->SetColor(LIGHT_BLACK2, LIGHT_WHITE2);
479+ turn = PIDMgr->GetTurnValue() * (-1);
480+}
481+
472482 void LookupGate::SetPIDData() {
473483 // PID制御に使用する定数を設定する
474484 PIDMgr->SetFixedData(1.4, 1, 0.03);
@@ -500,7 +510,7 @@
500510 if(runMode == normalRun) {
501511 BaseCourse::calcMotorPower();
502512 } else if(runMode == run66) {
503- const int LightWhite = 6;
513+ const int LightWhite = 12;
504514 // const int LightGray = 3;
505515 const int LightBlack = 0;
506516 const int targetColor = (LightWhite + LightBlack) / 2;
--- trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/LookupGate.h (revision 419)
+++ trunk/src/hrp2_beta7/sdk/workspace/sample_cpp2/course/LookupGate.h (revision 420)
@@ -62,6 +62,7 @@
6262 bool IsNextCourse();
6363 bool tail_control(signed int angle);
6464 virtual int sonar_alert(void);
65+ void updatePidValue();
6566 private:
6667 LookupGate(const LookupGate& orig){}
6768 bool m_stop;
Show on old repository browser