Changeset 11673 for trunk/FACT++/src/fscctrl.cc
- Timestamp:
- 07/27/11 21:02:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fscctrl.cc
r11578 r11673 79 79 80 80 private: 81 // 82 // From: http://de.wikipedia.org/wiki/Pt100 83 // 84 double GetTempPT1000(double R) const 85 { 86 const double R0 = 1000; // 1KOhm 87 88 const double a = 3.85e-3; 89 90 return (R/R0 - 1)/a; 91 } 92 93 81 94 void HandleReceivedData(const bs::error_code& err, size_t bytes_received, int /*type*/) 82 95 { … … 229 242 } 230 243 244 for (size_t i=0; i<resist.size(); i++) 245 if (resist[i]>800 && resist[i]<2000) 246 cout << setw(2) << i << " - " << setw(4) << (int)resist[i] << ": " << setprecision(1) << fixed << GetTempPT1000(resist[i]) << endl; 247 else 248 cout << setw(2) << i << " - " << setw(4) << (int)resist[i] << ": " << "----" << endl; 249 231 250 StartRead(); 232 251 } … … 530 549 po::options_description control("FTM control options"); 531 550 control.add_options() 551 ("no-dim", po_bool(), "Disable dim services") 532 552 ("addr,a", var<string>("localhost:5000"), "Network address of FTM") 533 553 ("quiet,q", po_bool(), "Disable printing contents of all received messages (except dynamic data) in clear text.")
Note:
See TracChangeset
for help on using the changeset viewer.