@Ric, found the issue. I moved the array declaration to make it global (DOH!).
@peekay123 It was all in setup, except for the declaration of gDeviceInfo which was global.