Advertisement
Guest User

actionbutton SR

a guest
Jan 24th, 2015
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. **************************
  2. ---- DcsBios.cpp---------
  3. ***************************
  4.  
  5. [...]
  6.  
  7. ActionButtonSR::ActionButtonSR(char* msg, char* arg, char srinput) {
  8.     msg_ = msg;
  9.     arg_ = arg;
  10.     srinput_ = srinput;
  11.     pinValues_ = pinValues;
  12.     lastState_ = pinValues_ & (1<< srinput_);
  13. }
  14. void ActionButtonSR::pollInput() {
  15.      int state = pinValues  & (1<< srinput_);
  16.     if (state != lastState_) {
  17.         if (lastState_ != 0 && state == 0)  {
  18.             sendDcsBiosMessage(msg_, arg_);
  19.         }
  20.     }
  21.     lastState_ = state;
  22. }
  23.  
  24. [...]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement