/** * School bus * * Author: Jan Dvořák z Vozerovic * E-mail: dvorkaman@gmail.com * Web: dvorkaman.asp2.cz * Created: 2015 */ /* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "stm32f4xx.h" #include "libSystem.h" #include "libSystemTime.h" #include "libXbeeApi.h" #include "libF4mini.h" #include "libUSART.h" #include "libPWMTone.h" #include "libUtils.h" #define DRIVE_MIN 63 // out of 255 #define STEER_MIN 10 #define STEER_MAX 170 #define LOCK_OFF 90 #define LOCK_ON 120 #define GEAR_LEFT_MIDDLE 90 #define GEAR_LEFT_MIN 60 #define GEAR_LEFT_MAX 120 #define GEAR_RIGHT_MIDDLE 90 #define GEAR_RIGHT_MIN 55 #define GEAR_RIGHT_MAX 120 #define HOOD_SPEED 100 // % void processCommand(libRemoteCommandValue cv); void setGear(uint8_t gear); void initializePeripherals(void); void clearPeripherals(void); void toneLoop(void);