- Timestamp:
- 11/24/15 13:22:43 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/drivectrl.cc
r18379 r18382 2180 2180 } 2181 2181 2182 int Screenshot(const EventImp &evt) 2183 { 2184 if (evt.GetSize()<2) 2185 { 2186 ostringstream msg; 2187 msg << "Screenshot - Received event has " << evt.GetSize() << " bytes, but expected at least 2."; 2188 T::Fatal(msg); 2189 return T::kSM_FatalError; 2190 } 2191 2192 if (evt.GetSize()==2) 2193 { 2194 ostringstream msg; 2195 msg << "Screenshot - Filename missing."; 2196 T::Error(msg); 2197 return T::GetCurrentState(); 2198 } 2199 2200 T::Info("Screenshot initiated."); 2201 Dim::SendCommandNB("TPOINT/SCREENSHOT", evt.GetData(), evt.GetSize()); 2202 return T::GetCurrentState(); 2203 } 2204 2182 2205 int SetLedBrightness(const EventImp &evt) 2183 2206 { … … 2487 2510 if (now>fSunRise) 2488 2511 { 2489 if (T::GetCurrentState()>State::kLocked) 2512 if (T::GetCurrentState()==State::kParking) 2513 return State::kParking; 2514 2515 if (T::GetCurrentState()>State::kLocked && T::GetCurrentState()!=StateMachineImp::kError) 2490 2516 return Park(); 2491 2517 … … 2769 2795 (bind(&StateMachineDrive::TPoint, this)) 2770 2796 ("Take a TPoint"); 2797 2798 T::AddEvent("SCREENSHOT", "B:1;C") 2799 (bind(&StateMachineDrive::Screenshot, this, placeholders::_1)) 2800 ("Take a screenshot" 2801 "|color[bool]:False if just the gray image should be saved." 2802 "|name[string]:Filename"); 2771 2803 2772 2804 T::AddEvent("SET_LED_BRIGHTNESS", "I:2")
Note:
See TracChangeset
for help on using the changeset viewer.