import logging

from networktables import NetworkTables
from wpilib.command import InstantCommand

import subsystems


class SwitchCamera(InstantCommand):
    def __init__(self):
        super().__init__("Switch Camera")

    def initialize(self):
        sd = NetworkTables.getTable("SmartDashboard")
        cur_direct = sd.getNumber("direction")
        logger = logging.getLogger("robot")

        if cur_direct == 1:
            subsystems.motors.reverseDirection()
            logger.info("Reversed")
        else:
            subsystems.motors.forwardDirection()
            logger.info("Forward")

        logger.info("Switched camera")

b309247ed1557f0e8cca5b45bd3166e084d0ff40
<mask token>


class SwitchCamera(InstantCommand):
    <mask token>
    <mask token>

<mask token>


class SwitchCamera(InstantCommand):
    <mask token>

    def initialize(self):
        sd = NetworkTables.getTable('SmartDashboard')
        cur_direct = sd.getNumber('direction')
        logger = logging.getLogger('robot')
        if cur_direct == 1:
            subsystems.motors.reverseDirection()
            logger.info('Reversed')
        else:
            subsystems.motors.forwardDirection()
            logger.info('Forward')
        logger.info('Switched camera')

<mask token>


class SwitchCamera(InstantCommand):

    def __init__(self):
        super().__init__('Switch Camera')

    def initialize(self):
        sd = NetworkTables.getTable('SmartDashboard')
        cur_direct = sd.getNumber('direction')
        logger = logging.getLogger('robot')
        if cur_direct == 1:
            subsystems.motors.reverseDirection()
            logger.info('Reversed')
        else:
            subsystems.motors.forwardDirection()
            logger.info('Forward')
        logger.info('Switched camera')

import logging
from networktables import NetworkTables
from wpilib.command import InstantCommand
import subsystems


class SwitchCamera(InstantCommand):

    def __init__(self):
        super().__init__('Switch Camera')

    def initialize(self):
        sd = NetworkTables.getTable('SmartDashboard')
        cur_direct = sd.getNumber('direction')
        logger = logging.getLogger('robot')
        if cur_direct == 1:
            subsystems.motors.reverseDirection()
            logger.info('Reversed')
        else:
            subsystems.motors.forwardDirection()
            logger.info('Forward')
        logger.info('Switched camera')

import logging

from networktables import NetworkTables
from wpilib.command import InstantCommand

import subsystems


class SwitchCamera(InstantCommand):
    def __init__(self):
        super().__init__("Switch Camera")

    def initialize(self):
        sd = NetworkTables.getTable("SmartDashboard")
        cur_direct = sd.getNumber("direction")
        logger = logging.getLogger("robot")

        if cur_direct == 1:
            subsystems.motors.reverseDirection()
            logger.info("Reversed")
        else:
            subsystems.motors.forwardDirection()
            logger.info("Forward")

        logger.info("Switched camera")
