Method: Extface::Driver::DaisyFx1200#handle
- Defined in:
- app/models/extface/driver/daisy_fx1200.rb
#handle(buffer) ⇒ Object
buffer is filled with multiple pushes, wait for full frame (ACKs)STX..PA2..PA1..ETX
47 48 49 50 51 52 |
# File 'app/models/extface/driver/daisy_fx1200.rb', line 47 def handle(buffer) #buffer is filled with multiple pushes, wait for full frame (ACKs)STX..PA2..PA1..ETX if i = buffer.index("\x03") || buffer.index("\x16") || buffer.index("\x15") rpush buffer[0..i] return i + 1 # return number of bytes processed end end |