def api_callback(fprogress, msg):
    """Callback function for API -> prints message from SolarPILOT DLL"""
    newline = False
    if fprogress != 0:
        print("Progress is {:.2f} %".format(fprogress*100))
        newline = True
    if msg.decode() != '':
        if newline:
            print("\n")
        print("C++ API message -> {:s}".format(msg.decode()))
    return 1