<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def p40baro(msg):
 """Barometric pressure setting Args: msg (String):
 28 bytes hexadecimal message (BDS40) string Returns: float: pressure in millibar """

    d = hex2bin(data(msg))

    if d[26] == '0':
        return None

    p = bin2int(d[27:39]) * 0.1 + 800    # millibar
    return p