Recent content by wayneandlayne

  1. W

    Odd behavior when wrapping Encoder inside another class

    Update: Using the new operator inside the constructor did not help. The compiler did not accept another usage of "class EncoderWrapper" in the cpp file. What did work was to move everything into the header file, which is ugly as sin, but I guess since Paul's Encoder library is that way, maybe...
  2. W

    Odd behavior when wrapping Encoder inside another class

    Thanks for the replies xxxajk! I'm working to build an Arduino library to provide a nice interface to control some motors, so I definitely need to keep both the CPP and H file for my library, as there will be lots more code in the wrapper class (this was just the simplest class that...
  3. W

    Odd behavior when wrapping Encoder inside another class

    Hello everyone, I have been trying to integrate the PJRC Encoder class inside my own motor control class library, but I've been having some troubles, probably related to interrupts or volatile variables or atomic access of multi-byte variables or something like that. This is with stock Arduino...
  4. W

    Encoder library - In Encoder_internal_state_t, why isn't position marked volatile?

    In the Encoder.h file for the Encoder library, this struct is defined: typedef struct { volatile IO_REG_TYPE * pin1_register; volatile IO_REG_TYPE * pin2_register; IO_REG_TYPE pin1_bitmask; IO_REG_TYPE pin2_bitmask; uint8_t...
Back
Top