code: def remap_status(val):
      
      status = 0
      bad = BAD_DATA if val & 0xF0 else 0
      val &= 0x0F
      if val == 0:
          status = START_ELEVATION
      elif val == 1:
          status = 0
      elif val == 2:
          status = END_ELEVATION
      elif val == 3:
          status = START_ELEVATION | START_VOLUME
      elif val == 4:
          status = END_ELEVATION | END_VOLUME
      elif val == 5:
          status = START_ELEVATION | LAST_ELEVATION
  
      return status | bad
docs: Convert status integer value to appropriate bitmask.