Browse Source

Fixing the strobe count on the Kishsaver

- Should fix the last of the phantom keys
simple
Jacob Alexander 10 years ago
parent
commit
2d5e6c4e12
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      Scan/avr-capsense/scan_loop.c

+ 3
- 4
Scan/avr-capsense/scan_loop.c View File

//#define TERMINAL_6110668_STROBE //#define TERMINAL_6110668_STROBE
//#define UNSAVER_STROBE //#define UNSAVER_STROBE
#ifdef KISHSAVER_STROBE #ifdef KISHSAVER_STROBE
total_strobes = 10;
total_strobes = 8;
//total_strobes = 9;


strobe_map[0] = 2; // Kishsaver doesn't use strobe 0 and 1 strobe_map[0] = 2; // Kishsaver doesn't use strobe 0 and 1
strobe_map[1] = 3; strobe_map[1] = 3;
inline void capsense_scan() inline void capsense_scan()
{ {
// TODO dfj code...needs commenting + cleanup... // TODO dfj code...needs commenting + cleanup...
uint8_t strober = 0;
uint32_t full_av_acc = 0; uint32_t full_av_acc = 0;


for (strober = 0; strober < total_strobes; ++strober)
for ( uint8_t strober = 0; strober < total_strobes; ++strober )
{ {
uint8_t map_strobe = strobe_map[strober]; uint8_t map_strobe = strobe_map[strober];


#define KEYSCAN_DEBOUNCE_DEBUG #define KEYSCAN_DEBOUNCE_DEBUG
#ifdef KEYSCAN_DEBOUNCE_DEBUG #ifdef KEYSCAN_DEBOUNCE_DEBUG
// Debug message // Debug message
// <key> [<strobe>:<mux>] : <sense val> : <delta + threshold> : <margin>
print("0x"); print("0x");
printHex_op( key, 2 ); printHex_op( key, 2 );
print(" "); print(" ");