Updated for new version of Ed's sensor