Alternate salinity code, seems to work with different interrupt strategy