def update(self):
        """ Update loop for sensors->perception->control(->vehicle). """
        try:
            self.read_time()
        except Exception as ex:
            self.data.has_time = False
            logging.exception("CORE:\tError in update loop (TIME) - %s" % ex)

        try:
            self.read_GPS()
        except Exception as ex:
            self.data.has_GPS = False
            logging.exception(ex % "CORE:\tError in update loop (GPS) - %s")

        try:
            self.read_compass()
        except Exception as ex:
            self.data.has_compass = False
            logging.exception("CORE:\tError in update loop (COMPASS) - %s" % ex)

        try:
            self.read_magnetometer()
        except Exception as ex:
            self.data.has_magnetometer = False
            logging.exception("CORE:\tError in update loop (MAGNETOMETER) - %s" % ex)

        try:
            self.read_accelerometer()
        except Exception as ex:
            self.data.has_accelerometer = False
            logging.exception("CORE:\tError in update loop (ACCELEROMETER) - %s" % ex)

        try:
            self.read_gyro()
        except Exception as ex:
            self.data.has_gyro = False
            logging.exception("CORE:\tError in update loop (GYROSCOPE) - %s" % ex)

        try:
            self.read_temperature()
        except Exception as ex:
            self.data.has_temperature = False
            logging.exception("CORE:\tError in update loop (TEMPERATURE) - %s" % ex)

        # try:
        #     self.capture_img()
        # except Exception as ex:
        #     logging.exception("CORE:\tError in update loop (CAMERA) - %s" % ex)

        try:
            self._perception_unit.update(self.data)
        except Exception as ex:
            logging.exception("CORE:\tError in update loop (PERCEPTION) - %s" % ex)

        try:
            self._navigation_unit.update()
        except Exception as ex:
            logging.exception("CORE:\tError in update loop (NAVIGATION) - %s" % ex)

    # Devices
dataset/ETHPy150Open FishPi/FishPi-POCV---Command---Control/fishpi/core_kernel.py/FishPiKernel.update/swapped operands of `%`