Merge branch 'master' into branch-1.6
authorBdale Garbee <bdale@gag.com>
Tue, 6 Sep 2016 02:59:11 +0000 (20:59 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 6 Sep 2016 02:59:11 +0000 (20:59 -0600)
879 files changed:
README
altosdroid/AndroidManifest.xml.in
altosdroid/res/layout/altosdroid.xml
altosdroid/res/layout/device_list.xml
altosdroid/res/layout/frequency.xml
altosdroid/res/layout/idle_mode.xml
altosdroid/res/layout/igniter_status.xml
altosdroid/res/layout/igniters.xml
altosdroid/res/layout/manage_frequencies.xml
altosdroid/res/layout/map_preload.xml
altosdroid/res/layout/map_type.xml
altosdroid/res/layout/setup.xml
altosdroid/res/layout/tab_flight.xml
altosdroid/res/layout/tab_map.xml
altosdroid/res/layout/tab_pad.xml
altosdroid/res/layout/tab_recover.xml
altosdroid/res/menu/option_menu.xml
altosdroid/res/values/Colors.xml
altosdroid/res/values/strings.xml
altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDebug.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidLink.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidMapInterface.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidMapSourceListener.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferences.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidPreferencesBackend.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosMapOffline.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosMapOnline.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosUsb.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosViewPager.java
altosdroid/src/org/altusmetrum/AltosDroid/AltosVoice.java
altosdroid/src/org/altusmetrum/AltosDroid/BuildInfo.java.in
altosdroid/src/org/altusmetrum/AltosDroid/DeviceAddress.java
altosdroid/src/org/altusmetrum/AltosDroid/GoNoGoLights.java
altosdroid/src/org/altusmetrum/AltosDroid/IdleModeActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/IgniterActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/ManageFrequenciesActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/MapTypeActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/SetupActivity.java
altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java
altosdroid/src/org/altusmetrum/AltosDroid/TabMap.java
altosdroid/src/org/altusmetrum/AltosDroid/TabPad.java
altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java
altosdroid/src/org/altusmetrum/AltosDroid/TelemetryReader.java
altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
altosdroid/src/org/altusmetrum/AltosDroid/TelemetryState.java
altoslib/AltosAccel.java
altoslib/AltosCRCException.java
altoslib/AltosCSV.java
altoslib/AltosCompanion.java
altoslib/AltosConfigData.java
altoslib/AltosConfigDataException.java
altoslib/AltosConfigValues.java
altoslib/AltosConvert.java
altoslib/AltosDebug.java
altoslib/AltosDistance.java
altoslib/AltosEeprom.java
altoslib/AltosEepromChunk.java
altoslib/AltosEepromDownload.java
altoslib/AltosEepromFile.java
altoslib/AltosEepromGPS.java
altoslib/AltosEepromHeader.java
altoslib/AltosEepromIterable.java
altoslib/AltosEepromList.java
altoslib/AltosEepromLog.java
altoslib/AltosEepromMega.java
altoslib/AltosEepromMetrum2.java
altoslib/AltosEepromMini.java
altoslib/AltosEepromMonitor.java
altoslib/AltosEepromTM.java
altoslib/AltosEepromTMini.java
altoslib/AltosFile.java
altoslib/AltosFlash.java
altoslib/AltosFlashListener.java
altoslib/AltosFlightDisplay.java
altoslib/AltosFlightReader.java
altoslib/AltosFlightStats.java
altoslib/AltosFontListener.java
altoslib/AltosFrequency.java
altoslib/AltosGPS.java
altoslib/AltosGPSSat.java
altoslib/AltosGreatCircle.java
altoslib/AltosHeight.java
altoslib/AltosHexfile.java
altoslib/AltosHexsym.java
altoslib/AltosIMU.java
altoslib/AltosIdle.java
altoslib/AltosIdleFetch.java
altoslib/AltosIdleMonitor.java
altoslib/AltosIdleMonitorListener.java
altoslib/AltosIdleReader.java
altoslib/AltosIgnite.java
altoslib/AltosImage.java
altoslib/AltosJson.java
altoslib/AltosKML.java
altoslib/AltosLatLon.java
altoslib/AltosLatitude.java
altoslib/AltosLaunchSite.java
altoslib/AltosLaunchSiteListener.java
altoslib/AltosLaunchSites.java
altoslib/AltosLib.java
altoslib/AltosLine.java
altoslib/AltosLink.java
altoslib/AltosListenerState.java
altoslib/AltosLocation.java
altoslib/AltosLog.java
altoslib/AltosLongitude.java
altoslib/AltosMag.java
altoslib/AltosMap.java
altoslib/AltosMapCache.java
altoslib/AltosMapCacheListener.java
altoslib/AltosMapInterface.java
altoslib/AltosMapLine.java
altoslib/AltosMapLoader.java
altoslib/AltosMapLoaderListener.java
altoslib/AltosMapMark.java
altoslib/AltosMapPath.java
altoslib/AltosMapPathPoint.java
altoslib/AltosMapRectangle.java
altoslib/AltosMapStore.java
altoslib/AltosMapStoreListener.java
altoslib/AltosMapTile.java
altoslib/AltosMapTileListener.java
altoslib/AltosMapTransform.java
altoslib/AltosMapTypeListener.java
altoslib/AltosMapZoomListener.java
altoslib/AltosMma655x.java
altoslib/AltosMs5607.java
altoslib/AltosNoSymbol.java
altoslib/AltosOrient.java
altoslib/AltosParse.java
altoslib/AltosPointDouble.java
altoslib/AltosPointInt.java
altoslib/AltosPreferences.java
altoslib/AltosPreferencesBackend.java
altoslib/AltosProgrammer.java
altoslib/AltosPyro.java
altoslib/AltosQuaternion.java
altoslib/AltosRectangle.java
altoslib/AltosReplayReader.java
altoslib/AltosRomconfig.java
altoslib/AltosRotation.java
altoslib/AltosSavedState.java
altoslib/AltosSelfFlash.java
altoslib/AltosSensorEMini.java
altoslib/AltosSensorMM.java
altoslib/AltosSensorMega.java
altoslib/AltosSensorMetrum.java
altoslib/AltosSensorTGPS.java
altoslib/AltosSensorTM.java
altoslib/AltosSensorTMini.java
altoslib/AltosSpeed.java
altoslib/AltosState.java
altoslib/AltosStateIterable.java
altoslib/AltosStateUpdate.java
altoslib/AltosTelemetry.java
altoslib/AltosTelemetryCompanion.java
altoslib/AltosTelemetryConfiguration.java
altoslib/AltosTelemetryFile.java
altoslib/AltosTelemetryIterable.java
altoslib/AltosTelemetryLegacy.java
altoslib/AltosTelemetryLocation.java
altoslib/AltosTelemetryMap.java
altoslib/AltosTelemetryMegaData.java
altoslib/AltosTelemetryMegaSensor.java
altoslib/AltosTelemetryMetrumData.java
altoslib/AltosTelemetryMetrumSensor.java
altoslib/AltosTelemetryMini.java
altoslib/AltosTelemetryRaw.java
altoslib/AltosTelemetryReader.java
altoslib/AltosTelemetrySatellite.java
altoslib/AltosTelemetrySensor.java
altoslib/AltosTelemetryStandard.java
altoslib/AltosTemperature.java
altoslib/AltosUnits.java
altoslib/AltosUnitsListener.java
altoslib/AltosUnitsRange.java
altoslib/AltosUnknownProduct.java
altoslib/AltosVersion.java.in
altoslib/AltosVoltage.java
altoslib/AltosWriter.java
altosui/Altos.java
altosui/AltosAscent.java
altosui/AltosChannelMenu.java
altosui/AltosCompanionInfo.java
altosui/AltosConfig.java
altosui/AltosConfigPyroUI.java
altosui/AltosConfigTD.java
altosui/AltosConfigTDUI.java
altosui/AltosConfigUI.java
altosui/AltosConfigureUI.java
altosui/AltosDescent.java
altosui/AltosDevice.java
altosui/AltosFlightStatus.java
altosui/AltosFlightStatusTableModel.java
altosui/AltosFlightStatusUpdate.java
altosui/AltosFlightUI.java
altosui/AltosGraphUI.java
altosui/AltosIdleMonitorUI.java
altosui/AltosIgniteUI.java
altosui/AltosIgnitor.java
altosui/AltosLanded.java
altosui/AltosLaunch.java
altosui/AltosLaunchUI.java
altosui/AltosPad.java
altosui/AltosUI.java
altosui/Makefile.am
altosui/altos-windows.nsi.in
altosuilib/AltosBTDevice.java
altosuilib/AltosBTDeviceIterator.java
altosuilib/AltosBTKnown.java
altosuilib/AltosBTManage.java
altosuilib/AltosCSVUI.java
altosuilib/AltosConfigFreqUI.java
altosuilib/AltosDataChooser.java
altosuilib/AltosDevice.java
altosuilib/AltosDeviceDialog.java
altosuilib/AltosDeviceUIDialog.java
altosuilib/AltosDisplayThread.java
altosuilib/AltosEepromDelete.java
altosuilib/AltosEepromManage.java
altosuilib/AltosEepromMonitor.java
altosuilib/AltosEepromMonitorUI.java
altosuilib/AltosEepromSelect.java
altosuilib/AltosFlashUI.java
altosuilib/AltosFlightInfoTableModel.java
altosuilib/AltosFlightStatsTable.java
altosuilib/AltosGraph.java
altosuilib/AltosGraphDataPoint.java
altosuilib/AltosGraphDataSet.java
altosuilib/AltosInfoTable.java
altosuilib/AltosLed.java
altosuilib/AltosLights.java
altosuilib/AltosPositionListener.java
altosuilib/AltosRomconfigUI.java
altosuilib/AltosScanUI.java
altosuilib/AltosSerial.java
altosuilib/AltosSerialInUseException.java
altosuilib/AltosUIAxis.java
altosuilib/AltosUIConfigure.java
altosuilib/AltosUIDataMissing.java
altosuilib/AltosUIDataPoint.java
altosuilib/AltosUIDataSet.java
altosuilib/AltosUIDialog.java
altosuilib/AltosUIEnable.java
altosuilib/AltosUIFlightTab.java
altosuilib/AltosUIFrame.java
altosuilib/AltosUIFreqList.java
altosuilib/AltosUIGraph.java
altosuilib/AltosUIGrapher.java
altosuilib/AltosUIImage.java
altosuilib/AltosUIIndicator.java
altosuilib/AltosUILib.java
altosuilib/AltosUIListener.java
altosuilib/AltosUIMap.java
altosuilib/AltosUIMapPreload.java
altosuilib/AltosUIMarker.java
altosuilib/AltosUIPreferences.java
altosuilib/AltosUIPreferencesBackend.java
altosuilib/AltosUIRateList.java
altosuilib/AltosUISeries.java
altosuilib/AltosUITelemetryList.java
altosuilib/AltosUIUnitsIndicator.java
altosuilib/AltosUIVoltageIndicator.java
altosuilib/AltosUSBDevice.java
altosuilib/AltosVoice.java
altosuilib/GrabNDrag.java
ao-bringup/ao_bringup.h
ao-bringup/ao_init.c
ao-bringup/ao_led_blink.c
ao-bringup/ao_radio_init.c
ao-bringup/ao_radio_test.c
ao-bringup/ao_radio_xmit.c
ao-bringup/test-chaoskey [new file with mode: 0755]
ao-bringup/turnon_chaoskey
ao-bringup/turnon_telemega
ao-bringup/turnon_telemetrum
ao-tools/ao-cal-accel/ao-cal-accel.c
ao-tools/ao-cal-freq/ao-cal-freq.c
ao-tools/ao-chaosread/ao-chaosread.c
ao-tools/ao-edit-telem/ao-edit-telem.c
ao-tools/ao-elftohex/ao-elftohex.c
ao-tools/ao-list/ao-list.c
ao-tools/ao-makebin/ao-makebin.c
ao-tools/ao-mega/ao-mega.c
ao-tools/ao-send-telem/ao-send-telem.c
ao-tools/ao-sky-flash/sky_bin.c
ao-tools/ao-sky-flash/sky_debug.c
ao-tools/ao-sky-flash/sky_flash.c
ao-tools/ao-sky-flash/sky_flash.h
ao-tools/ao-sky-flash/sky_serial.c
ao-tools/ao-sky-flash/sky_srec.c
ao-tools/ao-stmload/ao-stmload.c
ao-tools/ao-stmload/ao-stmload.h
ao-tools/ao-telem/ao-telem.c
ao-tools/ao-test-baro/ao-test-baro.c
ao-tools/ao-test-flash/ao-test-flash.c
ao-tools/ao-test-gps/ao-test-gps.c
ao-tools/ao-test-igniter/ao-test-igniter.c
ao-tools/ao-usbload/ao-usbload.c
ao-tools/ao-usbload/ao-usbload.h
ao-tools/ao-usbtrng/ao-usbtrng.c
ao-tools/ao-view/aoview.glade
ao-tools/ao-view/aoview.h
ao-tools/ao-view/aoview_channel.c
ao-tools/ao-view/aoview_convert.c
ao-tools/ao-view/aoview_dev_dialog.c
ao-tools/ao-view/aoview_eeprom.c
ao-tools/ao-view/aoview_file.c
ao-tools/ao-view/aoview_flite.c
ao-tools/ao-view/aoview_label.c
ao-tools/ao-view/aoview_log.c
ao-tools/ao-view/aoview_main.c
ao-tools/ao-view/aoview_monitor.c
ao-tools/ao-view/aoview_replay.c
ao-tools/ao-view/aoview_serial.c
ao-tools/ao-view/aoview_state.c
ao-tools/ao-view/aoview_table.c
ao-tools/ao-view/aoview_util.c
ao-tools/ao-view/aoview_voice.c
ao-tools/lib/ao-dfu.c
ao-tools/lib/ao-dfu.h
ao-tools/lib/ao-editaltos.c
ao-tools/lib/ao-editaltos.h
ao-tools/lib/ao-elf.c
ao-tools/lib/ao-elf.h
ao-tools/lib/ao-hex.h
ao-tools/lib/ao-selfload.c
ao-tools/lib/ao-selfload.h
ao-tools/lib/ao-verbose.c
ao-tools/lib/ao-verbose.h
ao-tools/lib/cc-analyse.c
ao-tools/lib/cc-convert.c
ao-tools/lib/cc-dsp.c
ao-tools/lib/cc-integrate.c
ao-tools/lib/cc-log.c
ao-tools/lib/cc-logfile.c
ao-tools/lib/cc-mega.c
ao-tools/lib/cc-period.c
ao-tools/lib/cc-process.c
ao-tools/lib/cc-telem.c
ao-tools/lib/cc-telemetry.c
ao-tools/lib/cc-telemetry.h
ao-tools/lib/cc-util.c
ao-tools/lib/cc.h
ao-tools/lib/cephes.h
ao-tools/lib/i0.c
ao-tools/lib/mconf.h
ao-tools/target/radio/init.c
ao-tools/target/radio/xmit.c
configure.ac
doc/Makefile
doc/altusmetrum-docinfo.xml
doc/release-notes-1.6.8.inc [new file with mode: 0644]
doc/release-notes.inc
icon/windows-stub.c
libaltos/libaltos.h
libaltos/libaltos_common.c
libaltos/libaltos_darwin.c
libaltos/libaltos_linux.c
libaltos/libaltos_posix.c
libaltos/libaltos_posix.h
libaltos/libaltos_private.h
libaltos/libaltos_windows.c
micropeak/MicroData.java
micropeak/MicroDataPoint.java
micropeak/MicroDeviceDialog.java
micropeak/MicroDownload.java
micropeak/MicroExport.java
micropeak/MicroFile.java
micropeak/MicroFileChooser.java
micropeak/MicroFrame.java
micropeak/MicroGraph.java
micropeak/MicroPeak.java
micropeak/MicroRaw.java
micropeak/MicroSave.java
micropeak/MicroSerial.java
micropeak/MicroSerialLog.java
micropeak/MicroStats.java
micropeak/MicroStatsTable.java
micropeak/MicroUSB.java
src/Makefile
src/attiny/ao_arch.h
src/attiny/ao_arch_funcs.h
src/attiny/ao_async.c
src/attiny/ao_async.h
src/attiny/ao_clock.c
src/attiny/ao_eeprom_tiny.c
src/attiny/ao_exti.c
src/attiny/ao_exti.h
src/attiny/ao_i2c_attiny.c
src/attiny/ao_led.c
src/attiny/ao_spi_attiny.c
src/avr-demo/ao_demo.c
src/avr/ao_adc_avr.c
src/avr/ao_arch.h
src/avr/ao_arch_funcs.h
src/avr/ao_avr_stdio.c
src/avr/ao_clock.c
src/avr/ao_debug_avr.c
src/avr/ao_eeprom_avr.c
src/avr/ao_i2c_usart.c
src/avr/ao_lcd_port.c
src/avr/ao_led.c
src/avr/ao_pins.h
src/avr/ao_pwmin.c
src/avr/ao_pwmin.h
src/avr/ao_romconfig.c
src/avr/ao_serial_avr.c
src/avr/ao_spi_slave.c
src/avr/ao_spi_usart.c
src/avr/ao_timer.c
src/avr/ao_usb_avr.c
src/cc1111/ao_adc.c
src/cc1111/ao_aes.c
src/cc1111/ao_arch.h
src/cc1111/ao_arch_funcs.h
src/cc1111/ao_battery.c
src/cc1111/ao_beep.c
src/cc1111/ao_button.c
src/cc1111/ao_dbg.c
src/cc1111/ao_dma.c
src/cc1111/ao_exti.c
src/cc1111/ao_exti.h
src/cc1111/ao_intflash.c
src/cc1111/ao_launch.c
src/cc1111/ao_lcd_port.c
src/cc1111/ao_led.c
src/cc1111/ao_pins.h
src/cc1111/ao_radio.c
src/cc1111/ao_reboot.c
src/cc1111/ao_romconfig.c
src/cc1111/ao_serial.c
src/cc1111/ao_spi.c
src/cc1111/ao_string.c
src/cc1111/ao_timer.c
src/cc1111/ao_usb.c
src/cc1111/cc1111.h
src/chaoskey-v0.1/ao_chaoskey.c
src/chaoskey-v0.1/ao_pins.h
src/chaoskey-v0.1/flash-loader/ao_pins.h
src/chaoskey-v1.0/ao_chaoskey.c
src/chaoskey-v1.0/ao_pins.h
src/chaoskey-v1.0/flash-loader/ao_pins.h
src/detherm/ao_detherm.c
src/detherm/ao_pins.h
src/detherm/flash-loader/ao_pins.h
src/drivers/ao_25lc1024.c
src/drivers/ao_25lc1024.h
src/drivers/ao_74hc165.c
src/drivers/ao_74hc165.h
src/drivers/ao_74hc497.c
src/drivers/ao_74hc497.h
src/drivers/ao_aprs.h
src/drivers/ao_at24c.c
src/drivers/ao_at45db161d.c
src/drivers/ao_at45db161d.h
src/drivers/ao_btm.c
src/drivers/ao_bufio.c
src/drivers/ao_bufio.h
src/drivers/ao_button.c
src/drivers/ao_button.h
src/drivers/ao_cc1120.c
src/drivers/ao_cc1120.h
src/drivers/ao_cc115l.c
src/drivers/ao_cc115l.h
src/drivers/ao_cc1200.c
src/drivers/ao_cc1200.h
src/drivers/ao_companion.c
src/drivers/ao_event.c
src/drivers/ao_event.h
src/drivers/ao_fat.c
src/drivers/ao_fat.h
src/drivers/ao_gps_sirf.c
src/drivers/ao_gps_skytraq.c
src/drivers/ao_gps_ublox.c
src/drivers/ao_gps_ublox.h
src/drivers/ao_hmc5883.c
src/drivers/ao_hmc5883.h
src/drivers/ao_lcd.c
src/drivers/ao_lco.c
src/drivers/ao_lco.h
src/drivers/ao_lco_cmd.c
src/drivers/ao_lco_cmd.h
src/drivers/ao_lco_func.c
src/drivers/ao_lco_func.h
src/drivers/ao_lco_two.c
src/drivers/ao_log_fat.c
src/drivers/ao_m25.c
src/drivers/ao_mma655x.c
src/drivers/ao_mma655x.h
src/drivers/ao_mpu6000.c
src/drivers/ao_mpu6000.h
src/drivers/ao_mr25.c
src/drivers/ao_ms5607.c
src/drivers/ao_ms5607.h
src/drivers/ao_ms5607_convert.c
src/drivers/ao_ms5607_convert_8051.c
src/drivers/ao_packet.c
src/drivers/ao_packet_master.c
src/drivers/ao_packet_slave.c
src/drivers/ao_pad.c
src/drivers/ao_pad.h
src/drivers/ao_pca9922.c
src/drivers/ao_pwm.h
src/drivers/ao_pyro_slave.c
src/drivers/ao_quadrature.c
src/drivers/ao_quadrature.h
src/drivers/ao_radio_master.c
src/drivers/ao_radio_slave.c
src/drivers/ao_radio_spi.h
src/drivers/ao_rfpa0133.c
src/drivers/ao_rfpa0133.h
src/drivers/ao_science_slave.c
src/drivers/ao_sdcard.c
src/drivers/ao_sdcard.h
src/drivers/ao_servo.c
src/drivers/ao_servo.h
src/drivers/ao_seven_segment.c
src/drivers/ao_seven_segment.h
src/drivers/ao_trng.c
src/drivers/ao_trng.h
src/drivers/ao_trng_send.c
src/drivers/ao_trng_send.h
src/drivers/ao_watchdog.c
src/drivers/ao_watchdog.h
src/easymega-v1.0/ao_easymega.c
src/easymega-v1.0/ao_pins.h
src/easymega-v1.0/flash-loader/ao_pins.h
src/easymini-v1.0/ao_easymini.c
src/easymini-v1.0/ao_pins.h
src/easymini-v1.0/flash-loader/ao_pins.h
src/kalman/kalman.5c
src/kalman/kalman_filter.5c
src/kalman/kalman_micro.5c
src/kalman/load_csv.5c
src/kalman/matrix.5c
src/kernel/ao.h
src/kernel/ao_adc.h
src/kernel/ao_aes.h
src/kernel/ao_balloon.c
src/kernel/ao_beep.h
src/kernel/ao_boot.h
src/kernel/ao_btm.h
src/kernel/ao_cmd.c
src/kernel/ao_companion.h
src/kernel/ao_config.c
src/kernel/ao_config.h
src/kernel/ao_convert.c
src/kernel/ao_convert_pa.c
src/kernel/ao_convert_pa_test.c
src/kernel/ao_convert_test.c
src/kernel/ao_convert_volt.c
src/kernel/ao_data.c
src/kernel/ao_data.h
src/kernel/ao_dbg.h
src/kernel/ao_debounce.c
src/kernel/ao_debounce.h
src/kernel/ao_distance.c
src/kernel/ao_distance.h
src/kernel/ao_ee_fake.c
src/kernel/ao_eeprom.h
src/kernel/ao_fake_flight.c
src/kernel/ao_fake_flight.h
src/kernel/ao_fast_timer.h
src/kernel/ao_fec.h
src/kernel/ao_fec_rx.c
src/kernel/ao_fec_tx.c
src/kernel/ao_flight.c
src/kernel/ao_flight.h
src/kernel/ao_flight_nano.c
src/kernel/ao_forward.c
src/kernel/ao_forward.h
src/kernel/ao_freq.c
src/kernel/ao_gps_print.c
src/kernel/ao_gps_report.c
src/kernel/ao_gps_report_mega.c
src/kernel/ao_gps_report_metrum.c
src/kernel/ao_gps_show.c
src/kernel/ao_host.h
src/kernel/ao_ignite.c
src/kernel/ao_int64.c
src/kernel/ao_int64.h
src/kernel/ao_kalman.c
src/kernel/ao_lcd.h
src/kernel/ao_led.h
src/kernel/ao_list.h
src/kernel/ao_log.c
src/kernel/ao_log.h
src/kernel/ao_log_big.c
src/kernel/ao_log_gps.c
src/kernel/ao_log_gps.h
src/kernel/ao_log_mega.c
src/kernel/ao_log_metrum.c
src/kernel/ao_log_micro.c
src/kernel/ao_log_micro.h
src/kernel/ao_log_mini.c
src/kernel/ao_log_single.c
src/kernel/ao_log_telem.c
src/kernel/ao_log_telescience.c
src/kernel/ao_log_tiny.c
src/kernel/ao_microflight.c
src/kernel/ao_microkalman.c
src/kernel/ao_monitor.c
src/kernel/ao_mutex.c
src/kernel/ao_notask.c
src/kernel/ao_notask.h
src/kernel/ao_packet.h
src/kernel/ao_panic.c
src/kernel/ao_power.c
src/kernel/ao_power.h
src/kernel/ao_product.c
src/kernel/ao_pyro.c
src/kernel/ao_pyro.h
src/kernel/ao_quaternion.h
src/kernel/ao_radio_cmac.c
src/kernel/ao_radio_cmac.h
src/kernel/ao_radio_cmac_cmd.c
src/kernel/ao_radio_cmac_cmd.h
src/kernel/ao_report.c
src/kernel/ao_report_micro.c
src/kernel/ao_rssi.c
src/kernel/ao_sample.c
src/kernel/ao_sample.h
src/kernel/ao_sample_profile.c
src/kernel/ao_sample_profile.h
src/kernel/ao_send_packet.c
src/kernel/ao_send_packet.h
src/kernel/ao_serial.h
src/kernel/ao_sqrt.c
src/kernel/ao_state.c
src/kernel/ao_stdio.c
src/kernel/ao_storage.c
src/kernel/ao_storage.h
src/kernel/ao_task.c
src/kernel/ao_task.h
src/kernel/ao_telem.h
src/kernel/ao_telemetry.c
src/kernel/ao_telemetry.h
src/kernel/ao_tracker.c
src/kernel/ao_tracker.h
src/kernel/ao_usb.h
src/lpc/altos-loader.ld
src/lpc/altos-standalone.ld
src/lpc/altos.ld
src/lpc/ao_adc_lpc.c
src/lpc/ao_arch.h
src/lpc/ao_arch_funcs.h
src/lpc/ao_beep_lpc.c
src/lpc/ao_boot_chain.c
src/lpc/ao_boot_pin.c
src/lpc/ao_exti.h
src/lpc/ao_exti_lpc.c
src/lpc/ao_fast_timer_lpc.c
src/lpc/ao_flash.h
src/lpc/ao_flash_loader_lpc.c
src/lpc/ao_flash_lpc.c
src/lpc/ao_flash_lpc_pins.h
src/lpc/ao_interrupt.c
src/lpc/ao_led_lpc.c
src/lpc/ao_romconfig.c
src/lpc/ao_serial_lpc.c
src/lpc/ao_spi_lpc.c
src/lpc/ao_timer_lpc.c
src/lpc/ao_usb_lpc.c
src/lpc/lpc.h
src/lpcxpresso/ao_demo.c
src/lpcxpresso/ao_pins.h
src/math/math.h
src/megadongle-v0.1/ao_megadongle.c
src/megadongle-v0.1/ao_pins.h
src/megadongle-v0.1/flash-loader/ao_pins.h
src/microkite/ao_pins.h
src/micropeak/ao_pins.h
src/micropeak/micro-log-parse.5c
src/microsplash/ao_pins.h
src/nanopeak-v0.1/ao_pins.h
src/product/ao_flash_pins.h
src/product/ao_flash_task.c
src/product/ao_flash_task.h
src/product/ao_micropeak.c
src/product/ao_micropeak.h
src/product/ao_teledongle.c
src/product/ao_telelaunch.c
src/product/ao_telemetrum.c
src/product/ao_telemini.c
src/product/ao_telenano.c
src/product/ao_telepyro.c
src/product/ao_telescience.c
src/product/ao_teleterra.c
src/product/ao_teleterra_0_2.c
src/product/ao_terraui.c
src/product/ao_test.c
src/product/ao_tidongle.c
src/spiradio-v0.1/ao_pins.h
src/spiradio-v0.1/ao_spiradio.c
src/stm-bringup/ao.h
src/stm-bringup/bringup.c
src/stm-bringup/bringup.ld
src/stm-demo/ao_demo.c
src/stm-demo/ao_pins.h
src/stm-demo/flash-loader/ao_pins.h
src/stm-flash/ao_pins.h
src/stm/altos-loader.ld
src/stm/altos-ram.ld
src/stm/altos.ld
src/stm/ao_adc_stm.c
src/stm/ao_arch.h
src/stm/ao_arch_funcs.h
src/stm/ao_beep_stm.c
src/stm/ao_boot_chain.c
src/stm/ao_boot_pin.c
src/stm/ao_dma_stm.c
src/stm/ao_eeprom_stm.c
src/stm/ao_exti.h
src/stm/ao_exti_stm.c
src/stm/ao_fast_timer.c
src/stm/ao_flash.h
src/stm/ao_flash_loader_stm.c
src/stm/ao_flash_stm.c
src/stm/ao_flash_stm_pins.h
src/stm/ao_i2c_stm.c
src/stm/ao_interrupt.c
src/stm/ao_lcd_font.c
src/stm/ao_lcd_stm.c
src/stm/ao_lcd_stm.h
src/stm/ao_led.c
src/stm/ao_mpu.h
src/stm/ao_mpu_stm.c
src/stm/ao_profile.c
src/stm/ao_profile.h
src/stm/ao_pwm_stm.c
src/stm/ao_romconfig.c
src/stm/ao_sample_profile_timer.c
src/stm/ao_sample_profile_timer.h
src/stm/ao_serial_stm.c
src/stm/ao_spi_stm.c
src/stm/ao_spi_stm_slave.c
src/stm/ao_timer.c
src/stm/ao_usb_stm.c
src/stm/stm32l.h
src/stmf0/Makefile-flash.defs
src/stmf0/altos-loader.ld
src/stmf0/altos.ld
src/stmf0/ao_adc_fast.c
src/stmf0/ao_adc_fast.h
src/stmf0/ao_arch.h
src/stmf0/ao_arch_funcs.h
src/stmf0/ao_boot_chain.c
src/stmf0/ao_boot_pin.c
src/stmf0/ao_crc.h
src/stmf0/ao_crc_stm.c
src/stmf0/ao_dma_stm.c
src/stmf0/ao_exti.h
src/stmf0/ao_exti_stm.c
src/stmf0/ao_flash.h
src/stmf0/ao_flash_loader_stm.c
src/stmf0/ao_flash_stm.c
src/stmf0/ao_flash_stm_pins.h
src/stmf0/ao_gpio.c
src/stmf0/ao_interrupt.c
src/stmf0/ao_led.c
src/stmf0/ao_pwm.c
src/stmf0/ao_romconfig.c
src/stmf0/ao_spi_stm.c
src/stmf0/ao_timer.c
src/stmf0/ao_usb_stm.c
src/stmf0/stm32f0.h
src/teleballoon-v1.1/ao_pins.h
src/teleballoon-v1.1/ao_teleballoon.c
src/teleballoon-v2.0/ao_pins.h
src/teleballoon-v2.0/ao_teleballoon.c
src/telebt-v1.0/ao_pins.h
src/telebt-v1.0/ao_telebt.c
src/telebt-v3.0/ao_pins.h
src/telebt-v3.0/ao_telebt.c
src/telebt-v3.0/flash-loader/ao_pins.h
src/teledongle-v1.8/ao_pins.h
src/teledongle-v1.8/ao_teledongle.c
src/teledongle-v3.0/ao_pins.h
src/teledongle-v3.0/ao_teledongle.c
src/teledongle-v3.0/flash-loader/ao_pins.h
src/telefire-v0.1/ao_pins.h
src/telefire-v0.1/ao_telefire.c
src/telefire-v0.2/ao_pins.h
src/telefire-v0.2/ao_telefire.c
src/telefiretwo-v0.1/ao_pins.h
src/telefiretwo-v0.1/ao_telefiretwo.c
src/telefiretwo-v0.1/flash-loader/ao_pins.h
src/telefiretwo-v0.2/ao_pins.h
src/telefiretwo-v0.2/ao_telefiretwo.c
src/telefiretwo-v0.2/flash-loader/ao_pins.h
src/telegps-v0.1/ao_pins.h
src/telegps-v0.1/ao_telegps.c
src/telegps-v0.1/flash-loader/ao_pins.h
src/telegps-v0.3/ao_pins.h
src/telegps-v0.3/ao_telegps.c
src/telegps-v0.3/flash-loader/ao_pins.h
src/telegps-v1.0/ao_pins.h
src/telegps-v1.0/ao_telegps.c
src/telegps-v1.0/flash-loader/ao_pins.h
src/telelco-v0.1/ao_lco.c
src/telelco-v0.1/ao_lco.h
src/telelco-v0.1/ao_pins.h
src/telelco-v0.1/ao_telelco.c
src/telelco-v0.2/ao_pins.h
src/telelco-v0.2/ao_telelco.c
src/telelco-v0.2/flash-loader/ao_pins.h
src/telelco-v0.3/ao_pins.h
src/telelco-v0.3/ao_telelco.c
src/telelco-v0.3/flash-loader/ao_pins.h
src/telelcotwo-v0.1/ao_pins.h
src/telelcotwo-v0.1/ao_telelcotwo.c
src/telelcotwo-v0.1/flash-loader/ao_pins.h
src/telemega-v0.1/ao_pins.h
src/telemega-v0.1/ao_telemega.c
src/telemega-v0.1/flash-loader/ao_pins.h
src/telemega-v1.0/ao_pins.h
src/telemega-v1.0/ao_telemega.c
src/telemega-v1.0/flash-loader/ao_pins.h
src/telemega-v2.0/ao_pins.h
src/telemega-v2.0/ao_telemega.c
src/telemega-v2.0/flash-loader/ao_pins.h
src/telemetrum-v2.0/ao_pins.h
src/telemetrum-v2.0/ao_telemetrum.c
src/telemetrum-v2.0/flash-loader/ao_pins.h
src/telemetrum-v3.0/.gitignore [new file with mode: 0644]
src/telemetrum-v3.0/Makefile [new file with mode: 0644]
src/telemetrum-v3.0/ao_pins.h [new file with mode: 0644]
src/telemetrum-v3.0/ao_telemetrum.c [new file with mode: 0644]
src/telemetrum-v3.0/flash-loader/Makefile [new file with mode: 0644]
src/telemetrum-v3.0/flash-loader/ao_pins.h [new file with mode: 0644]
src/telemini-v2.0/ao_pins.h
src/telemini-v2.0/ao_telemini.c
src/telerepeat-v1.0/ao_pins.h
src/telerepeat-v1.0/ao_telerepeat.c
src/telescience-v0.2/ao_pins.h
src/telescience-v0.2/ao_telescience.c
src/telescience-v0.2/flash-loader/ao_pins.h
src/teleshield-v0.1/ao_ardu_serial.c
src/teleshield-v0.1/ao_pins.h
src/teleshield-v0.1/ao_teleshield.c
src/teleterra-v0.1/ao_pins.h
src/teleterra-v0.2/ao_pins.h
src/test/ao_aes_test.c
src/test/ao_aprs_test.c
src/test/ao_fat_test.c
src/test/ao_fec_test.c
src/test/ao_flight_test.c
src/test/ao_gps_test.c
src/test/ao_gps_test_skytraq.c
src/test/ao_gps_test_ublox.c
src/test/ao_int64_test.c
src/test/ao_micropeak_test.c
src/test/ao_ms5607_convert_test.c
src/test/ao_quaternion_test.c
src/usbrelay-v0.1/ao_pins.h
src/usbrelay-v0.1/ao_usbrelay.c
src/usbrelay-v0.1/flash-loader/ao_pins.h
src/usbtrng-v2.0/ao_pins.h
src/usbtrng-v2.0/ao_usbtrng.c
src/usbtrng-v2.0/flash-loader/ao_pins.h
src/usbtrng/ao_pins.h
src/usbtrng/ao_usbtrng.c
src/usbtrng/flash-loader/ao_pins.h
src/util/make-whiten
telegps/TeleGPS.java
telegps/TeleGPSConfig.java
telegps/TeleGPSConfigUI.java
telegps/TeleGPSDisplayThread.java
telegps/TeleGPSGraphUI.java
telegps/TeleGPSInfo.java
telegps/TeleGPSPreferences.java
telegps/TeleGPSState.java
telegps/TeleGPSStatus.java
telegps/TeleGPSStatusUpdate.java

diff --git a/README b/README
index 282b9ce5a95d63139a9f3d0fdadb71c31884f831..b189483a304427a33bd83379ab3bb1526805f874 100644 (file)
--- a/README
+++ b/README
@@ -6,7 +6,8 @@ Copyright and License
 
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
-       the Free Software Foundation; version 2 of the License.
+       the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
 
        This program is distributed in the hope that it will be useful, but
        WITHOUT ANY WARRANTY; without even the implied warranty of
index 2644d747917480b274aa1a96f7ae5feae578ae99..3f17188e0444b94ec58a86be4739eac98ea07464 100644 (file)
@@ -1,19 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- * Copyright Â© 2012 Mike Beattie <mike@ethernal.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+ Copyright Â© 2012 Mike Beattie <mike@ethernal.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="org.altusmetrum.AltosDroid"
index 71b7ad054bc95dd05dfaa7e6e29572656554f38b..df870672f1c4b9103530ac03bdd9ec162b55f0f9 100644 (file)
@@ -1,19 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-        Copyright Â© 2012-2013 Mike Beattie <mike@ethernal.org>
 
-        This program is free software; you can redistribute it and/or modify
-        it under the terms of the GNU General Public License as published by
-        the Free Software Foundation; version 2 of the License.
+ Copyright Â© 2012-2013 Mike Beattie <mike@ethernal.org>
 
-        This program is distributed in the hope that it will be useful, but
-        WITHOUT ANY WARRANTY; without even the implied warranty of
-        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-        General Public License for more details.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 
-        You should have received a copy of the GNU General Public License along
-        with this program; if not, write to the Free Software Foundation, Inc.,
-        59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
index 57e5501e1aaecb886c95cf64f0586aad719fb782..0c103e9d405bf76e5f728912141d1784094261e8 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index 7f8d4041cf19b1cb830df2ca713af609071e9dea..7adbdc16f6d202fa1718736a55bc041b73eea1db 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index d6a05fbba8ef7c2712e36a7d6c6b024227b3572e..6c598c1cbb4d5cdc2e3d5fffaa87f860ef807d82 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index 298f915528f53c97f11870b6bea959bb6163bcf1..931ad62699b3724807acd781a6b58a12497aa364 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index 350a1e587a75b60938afe61587c807c27d3d916f..6ce5b2426d4e8ca7eb7e187221ca086ede05e266 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index 77ded1d9cfc3522e6fb622e3b26d8a8d1ea8e4ac..afb3310fbfccdb6e77681caaa7bd3192db7fecc3 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index e8b0f26c2596b891f6982aa105d7817795ce0c4e..321e5ee3f824c22f603b3f67ed06c1d6392af192 100644 (file)
@@ -4,7 +4,8 @@
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; version 2 of the License.
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
 
   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
index 610e6bbf05dd5a8125fb8958344f38b4df148fc8..e5cea22a213917611d840dddf236943f8d8569d0 100644 (file)
@@ -4,7 +4,8 @@
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; version 2 of the License.
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
 
   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
index 630378a1510b44a3484dd70756e34c616aa8f171..eeaf60ab6a6ff50af4c853ae81b179f38ec39660 100644 (file)
@@ -5,7 +5,8 @@
 
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
index 85c171b23711538059bfe8f423ad80eb1e03a88e..36d277d7cc962ebb79617bdbe1581b863d3e0e28 100644 (file)
@@ -4,7 +4,8 @@
 
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
-     the Free Software Foundation; version 2 of the License.
+     the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
 
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
index 952abd494dd80066fb6c276c6796986491f03299..25ae3a8b7a626f5aae4990a3fc5e6d470c746f3c 100644 (file)
@@ -4,7 +4,8 @@
 
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
-     the Free Software Foundation; version 2 of the License.
+     the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
 
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
index 88648c3bedce81727afbd369880a89428e6e4a16..990a6be356a06b7768ac6fcbab1c994a1a925bb5 100644 (file)
@@ -4,7 +4,8 @@
 
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
-     the Free Software Foundation; version 2 of the License.
+     the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
 
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
index 201f45edd210ba57f53e249493a99b258edff0f3..7d1e750de9a33d4b8d8f2977f502a915f0c68ced 100644 (file)
@@ -4,7 +4,8 @@
 
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
-     the Free Software Foundation; version 2 of the License.
+     the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
 
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
index b2ca01a4c33f9acbb79eb30d190331dcf49e6b67..53a0de0fc7378fa2abdb35cb69af608ecc807c0f 100644 (file)
@@ -4,7 +4,8 @@
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; version 2 of the License.
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
 
   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
index 055c6df2b6ca1fef8eec756711a28c1782c0a733..8dddae2d24cd6d585595320dc8ee77ef9932c4fe 100644 (file)
@@ -4,7 +4,8 @@
 
         This program is free software; you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
-        the Free Software Foundation; version 2 of the License.
+        the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
 
         This program is distributed in the hope that it will be useful, but
         WITHOUT ANY WARRANTY; without even the implied warranty of
index 4380d62da413a1774507521a487f01394ae6bd03..6a1d24fe262c0f3078994b4d41c6367d178b5953 100644 (file)
@@ -4,7 +4,8 @@
 
         This program is free software; you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
-        the Free Software Foundation; version 2 of the License.
+        the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
 
         This program is distributed in the hope that it will be useful, but
         WITHOUT ANY WARRANTY; without even the implied warranty of
index 246fb0b049d4789522616f96cf389d8041c16cbf..8e65e1d01cd2b724becfba5b670f3637520c3799 100644 (file)
@@ -4,7 +4,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index eddc83b95c58bdd09f07a4072e828dc01fbb3b40..b8c907739d9095b704641386ce91704662604dbf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a62bf7fe0d051f818762dcfc02f1c301ca6d53c3..30a949d57378cf8607c7a7a2e5a230e9c2dfb7c3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bca70d69d2de3331d08dfda93399334370db2831..23105635621ca99ab67f2d66786c33472d987dba 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b9b4b50f777d3d7c738784845dd4ebfbe9873ed9..2b78104d922d25964a0a948450682f7198590e16 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e2775ef50e412192d8c424ad544f195b6b2b7021..294094c268c06cae0a1c7f35a7ba03a6cd5fff82 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 446bbf041ef402e689b557df7c3ab49d1261aefa..c7cdc961729aad7e385633ac539f792e82cd9fb7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e48b7b2aa3202ec6e1acc1c8bf29444955a43eac..2e6ccb34e2227277910bbf1237392ff404980287 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3e10d3a4a5329bc3ce5fb0cc0a183c048cdb183f..11d8f6241fc885b1b140696c803a78753e3b4b77 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0061eba1c304aa1b1b7d01283f56eedb0f4dc869..76771adcfce6246ae3b57078be6ff2338f4f5a7e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9a828df51c29f3e1d05d1785bb1ec046e97332a6..9e5d6deea091acc9f9a8588956f9140adc28a149 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4b007cb158ed3459e594dac59dbf7935253a7929..8d0a725aef5347191e7da8868b89805d4d880c58 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f22298d73d0a49a82c0c8a66c474cd82180a9041..039ba149a219a36aa5d53761f8e6560183354778 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d7c0f6237c4843a551e0451c4ecca3110117e9e7..811b03675d63640bb62d258ce46a6a249fa43d9d 100644 (file)
@@ -4,7 +4,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e9b3011a39d027297e0dcb2bde12105f42d000e4..aa6c9a74130bca10ce17c9d0065e66da5006e44c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 673d72dd02457b10aac07fbcfa6cec6be4b50ce3..6f845566b1e29d51032a75b4aed2de97bea841d7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6cecbdf1aa9b8203b20ce33109bd0ec1cce6f136..c18d7309a474aef6b63ab56a39595c37f6d92f45 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c4e950b66bfff99b3b6f0c772911dbda92bce20f..7b3bbb4e9644339c69e334e7da91cf4b024c9566 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d9229ad6b03213f4ef4106b5cc28ed317b0166bd..4b8dc3e8452c8ffa6afce09783ee9fb3b4d70050 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d8fd92df740e1139daa0a86d7bd20c7929785303..0eef129e38e20037fce7b656cf3de58995b3d333 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d8bcad753e689c91fb9501aa0a18b46e5e98a4aa..a0c7233f50b00b34a671f6f4f4752163e1fa05a5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e3e7b01c2822737a0e9fc778edc473e3e49f0c4..a8e87bf265773e64c448af238feef8ff26dfcd40 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 06e74d9be7dbe8c62df9b41038424e28223d685b..41c3eb8842830c203f48d0acefb9118a5e61dd58 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dc8390e3dcd8b2041b42b1a7249c98e5ce30a04a..3143679a3690036067a4af16307042b6646bb13e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9e3cb530cc3a821ddd796ca2212c69cdf978c688..5db5b85fd23e1fa9c3836f62295be050e0ac3a8d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fffc426a1bf99156320a1c6e9f8294407e819b54..492f7f5f4585c61dffb703c5189fd4802423bbd2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b0fe9e5fe4001c1aeb0ce9b08a39ff2432ca8cbf..97a35c9eb4a044ca9f1903f9394586725c48a409 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 21ac0fbfb3dfea3594524648900dd092db982612..bc0b3615476982bf16303306b89ea6e72137ecb4 100644 (file)
@@ -4,7 +4,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dc39c899822ef9ad995ae52c2658f2e21b37e29e..34c86ce5b56e31b5d7b5cc46409297811d2353f2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e7bef92c27648ff7702e33e35cc961b6009b06d4..32ba12546d66c2ae9cbafbb766945f21299053ca 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c6a2da114f5446f3e1abc938bd16cb02154cbb48..31aa7c1b9e9b2c940e4853bd8b1a9824689247a8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 87d84370ac60495c0048b2050998ab2c0f08d0b3..80dca140da3fa282b5a4322f1733640a4c685129 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b38ed8dad3cdc3cfd1303e1a31347125d653f43c..b51994563aec8b145a3b13ffd222dce9a692b245 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e228b074d8f5729ae77e822e081efa7ebdb16972..2c03c922ed5851865d72ce957ec736ccdf14aec6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ce430d7a9137f082ddffcf667acd7f7c805f1dd8..6b55cc6fdc9c8dc7c7177b0e5e7bf4030ec2e49b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a55f75c2610bbeae680638954c7e6de576a00e28..59a8e9c180851a8caea6c7adff9fd5ee8a1ab529 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index babd7a4d98f5c9465db5cbc9801efc7b66ca0676..bc20d21ddfee0fa9837d62ebf833021ad290d696 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5498ae98cb855f66d42cd858bf275a71ad830b08..288f43ce47857a3af002f0298270be13d2a6c7e5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0bb126881fb757e1e7df260885e395e73a24ccfb..aa1b298fca9209233e4a935a704aeffb153ff7f1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1ade5abbe354b3356ceddd6b3f5667d04d24acbd..0239c5cec2670c5b0476aa2e6e28f57f863c06e5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 94009b57ab30f3770cd94428d9b65d4507f68e92..6ed14d3abe576773100660fc29e0e67e72fd6742 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4f95663690ab43edbd3cd0e40f5acbe4c56a154e..c9598254e34dbe34e0ef98f3a4e0f449d446d4b3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fa76574cb568528ee8e8352967611e2440ff7e61..c38fcfdf10432008e758a0c4fc73b6309db8cee6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d23116a66a71bb57866ca641a1461bf63e0fe3d6..957c826a019098ec17bdce98be1ffb5b6cd1d052 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a6d2ef32dc307ccb2081535c551a8b00ad507812..e76b36dde0f0492f004e4633b394a02c030fb8bf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1f94ac07c2a16df90ab8e4f21b092481bf0c9c2c..37b666b4bf085af84e1e0772f904fdf1765a897c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c0311b99c586c8ed92e4c0501f5a4e50a5f9c84e..77632ac139b2bf424bb19d8c98955bb4c1e8fc08 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index abc30a710e16f1058fc29b9f8668a9d5b4d2e66b..fc72fd95a88c9d9c25e5313d0cb1ccdab99630e6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9eb5d23093abd13804ea07bcb6a23c1fdee693dc..1bca65630d8509c075876d33dc842ebea807c4b8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 09fb4288e45871f897987ba01a2d1fe5772b3623..082d6054f2fe8b25244c0f76fa8ce0d73d09c334 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f23bffd263bbd620148e111d19c44b07886af1ff..f685b3ce0e7eb2355d5f9e9fc1dca9fb57c0fcf5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b06e6c84e9127090ed29051b2ecae70f84907041..dc51e591de71c626ea371422769742d76e370f6d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9f6094a55e30288b460c998f37725b583f48d9d8..792fde272c641fe70363be83b88c9af809d7ab2f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a65bd11ef3495554f2c2f4dce2f611417cae243b..9a09f92693363f10ef162cc21ba274f353842ef6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 82f5aedf73dd2fd05963c263530ecac8490c04fc..2557f431d5edce94b0160294aa48022a2ed2944e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dc2dba82b925b5fa8eac5a7a4074f641f205097f..ef75762a5a7c8dd0ccf4c8b4a95dff4805ba0b22 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 285e31d59811e7eec725c7ac743f4f24673456e7..ad5733051e00059cac753e02f3a64fc5adf4eeb2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 170bf0b089bde31534a275b26bf6e6a6dff37365..e15d7ac3e4a72c72ee5d17e784499017d0a70856 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5a6d88d17f810f4b3efe2e4d57e65b7e69be6437..c395dc4584b573eccc2a2f2308e4188f91c0c255 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 77711a4cc8f3c90fce1e5b8899561ce2e3b8f3aa..250e2236b7a555a5fb2173f0bc6c925ae563e9bf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 32314b2becab8ac0031e2a1e407f173ac020bc88..98f13dac50965e6fc43b5be336b1bb949b70b84a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9a1622d9c495880c30b87478cb134a15b20c66d7..c7f339a02b09eb9fb744d99e57a031925c209868 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 874a9bccb5a41f8682056eb626b47bb6d73720e6..3b2a445a084e1560cc4477f7623d4216baa26468 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d29ccdd1fbe0f6d0e035a50f1cd4aacecad797fd..0b30ed456593f75587ca57b2ff6a7954810f82db 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,6 +21,7 @@ package org.altusmetrum.altoslib_11;
 import java.text.*;
 import java.util.concurrent.*;
 import java.io.*;
+import java.time.*;
 
 public class AltosGPS implements Cloneable {
 
@@ -72,6 +74,24 @@ public class AltosGPS implements Cloneable {
                hour = minute = second = AltosLib.MISSING;
        }
 
+       /* Return time since epoc in seconds */
+       public long seconds() {
+               if (year == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               if (month == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               if (day == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               if (hour == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               if (minute == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               if (second == AltosLib.MISSING)
+                       return AltosLib.MISSING;
+               OffsetDateTime  odt = OffsetDateTime.of(year, month, day, hour, minute, second, 0, ZoneOffset.UTC);
+               return odt.toEpochSecond();
+       }
+
        public AltosGPS(AltosTelemetryMap map) throws ParseException {
                String  state = map.get_string(AltosTelemetryLegacy.AO_TELEM_GPS_STATE,
                                               AltosTelemetryLegacy.AO_TELEM_GPS_STATE_ERROR);
index 8b95c150a4e6a594eb986892db2dd84e332da557..e2f0f38038ab286216f172925b96540a840a9a6c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a2f128074c89ebe29b446f7af027683762acf9b4..6e5bd362372f4c633b423594b94cb37e296bb420 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 01bd4a6b84462e6b607c5283785f69675f2a4bb7..0cd495fb19a38e5c03d2f00087a9c60750ee0925 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e7f900c48defa17deca930ef6fb905b33e61a830..e746b6494a422d7860399831524dee59d8b6a0e8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ab2beff50599663374bc878dbc4f9e164b8beb1a..2eb08f75ab1d821cb7300c6111fcf1e8312be4b8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dbadcf898efbab85db95d47f5579df9686f9ea56..f6cadf1d13a0f4276a15156e9f99dc9535c7cfa4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 36a3ca0474bc9f85c4f32fe17cb70d107452959a..d37af9664b166eac8fc964a9bd5226ae738fe3ef 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5102c16b3f6f92f0cb50478d26500944899a0dff..8871e9cc1089d6c3aab624052962efa302a3f852 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fde8c101a5df382968d93099a97d60f91090ceed..c374b6015d5563350844c035136949eaa78facef 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 27a5146673d8271cea730234418d6384d6490f00..3349e9c4a98e3102374a8879a8f979d3de14b2da 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 795593f7750575cea02ce3312d885679236fe152..5903c96815f03feb12adbbb1667085a8bb2eed38 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f3c07339b0fc411ec52ef195723a9f1b05869db5..cdc5c614c08d425cd15c72ee74dd2d0826521de4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9a0751b672cc3d71f289ec19de30c4fd6640f95e..2e32b7200872063b7343ac7f33ce76c17b6e8d0f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 67f3a00ad3fdc2502e7921cc962ad98b5a8e5bb1..22f81d037c06ef43907fb633e8fa3a5c5bf46877 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ba0530151dde79d8204b8fae6afa1b89c44904eb..25108bf97c67ad27660f8d1e3915b561c1724b8e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ed1dd64e99d247068ac69683ed6094c796547732..5865d3ccf32730bb9ae8a97c06918195f63232f2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 04931ece1794176284dbdb68a43b12109a73b749..4663cd0943fb5c371652836accd7a78f29e0155d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 831fdf64b713620b60ff4000fd22148806301c92..8a06cdb205d815b3603df86b5f38cddc737de6b9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6167b7cf957c34b1f775e1c9eb7ee06948f15f48..d2ee601ee36c7318d1dd52abda8165c7c19bd228 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index db6a1f80a018448e40de53cd45f80dd286edd4e2..d5c41c82d7f930e9d3399969d58cde3330b55c82 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 044caf8de1ca2d144de41bb20e44544b8d0e1e84..cfa1fa2746da84690ba3df658f6e19b04eafebfa 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 90490192b323914583a8b6e9ebe3296a703a8a26..952a21e3e6bb35eaa6d60f4a5df45a3947f7ef02 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 327666743396ef0ce21b9ef97f7180c6d718cadd..76a4eb31c6cc1e6eef952088dbb25a451bf4fa70 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7d9ec2a49760019f40fe8bcb0d1c9d69a5971a96..80bc0df2708794f5db62dbb238675be004d95069 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2ab07ebb01bc1e43048f20302d33bcc5b9ddd205..c612caaa10c530a65fa45ad27af72882a48e160f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 74017a299cf16a0d5c51b3d4f482690f44367224..6d873d7811576171aa29b63b4daf725c2c4f956b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 77fe9c9a5ee2ae9305e7cab7b7e70cdd25e84cc3..4c6d185738838e354e095a3453bd1ef730806289 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5864529fe4f175683ef04149c9812443506b7a37..e89ec0debf5742abff50960451dd0006b02b3493 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0c775f333ee79aacf9ffb08a4c11c243fd9910e5..e3c4a6a79ec54db6223c62fd4690899a74855d14 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 28f6b1163f6323a8286d6f310944cffdb2a60fa3..4e529177984a77c4787be9a1e149108cf4cfa344 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b010d12f0a59187e802a24743901f0265098b9f7..057d1c43ceca03ac077716881fbabd65d344cca2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 78cd70ebf4b7a7b886fd0dcb5158cf107f3ca9b0..a2ea81dbc2eb9ae19dc6deafd9f460ff83543080 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 187aa6d9e01f124ff7eea364e14a40e69fdf6115..c475f52d1cbd561c963c38930d6d67a685578ba4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d715df38ea0ce4e1a64e662da723a7707b8fdf16..17e88bf414757411222f4021dde18336421f246f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 97c8b7f5b5d7910212602cc307717c9c38cb04ab..07624f80fb331c3e700d8e2b60f8ed03fbe8da6f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0fac5b37eb79d2c4d78a833964118a3a03f9f298..cbe7bebe46b4f5328cfcc67fa603a86f04502148 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 75664f8396a21789de311a11e680d30b23722d87..c2335169383393430acf907e39e65d37f5172930 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 89494408cd2da0b8de36a909a963a3da099176d1..5182ecfd6b21da1233bd337049a29c5212932ced 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 566e414fc37f0457f6ea8c5ab62878393fc24079..a2321e19456e8e59e1a4236199da8d94de5a0b29 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 53bfd5170afd401ef629e5dbf436574b8bb451dd..7cce05a594c7eccb8008aaaca85c68357d97f76b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bfee5f5c9779a733760b50d04eda84a0862d74d6..e393520102bd0c450020960c9ef0f661a4f6a38f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b65f6fc14632562ab4c46a181bf5bf11baf01e33..4d6dc8d124d7933c95118cc1ae881c8154c06323 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7939e4bd3b484d2f90872d0cff7469e34b7defe2..219dcd07e4aacee219245cbf32d82f1e013c0d31 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 53f3abac1e7c83c65b9f46cc7929091fa08f6528..266557b60b94ad96aaa43fe67529ac6f2b4a40e5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 20740e7d160fdbd22f40bd3d371883e8f8791b6f..1d5e2b47b91bb4d65ae51049589c27e6df0af814 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 59c91e8e3d09f4890af074520a0f897c982970fb..93c26cbbabdf288875b99f097b288b276c103a7c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 57bc7b9163d9ecda3c43f3dc7f7a728b967261da..503eb5fd0808e597424ac2df60769d060f4866af 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e40479b188fbd4162a545cd0290a1a4a553c7211..631bc716d41c23fbb70324f36b812b363fcbac30 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3f3cbbe7eb81fec82c1a673a7ef9b354683e48dc..37542cf08208aee688dcfbf6ea10722474665967 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index edaa304cb854e6dbe8344d853ebac590a1ca12c7..8b3a35414ce0baa2dc2f8e45acf72f46cf28232b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 45ef7dac843cf265e1fb7309136d8a757e1c36e2..b4b6f87547955c22dac9af0c2cc7577c631363eb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b18c4b48af41d65709e34b0b8d7789f5d271ce17..31b03b1fe7c132b2f9fbd8a55e2ab1cd62af15ef 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 14b0dabf438cedf5b088122d4c70a76239ca1729..233a8d316489740dcc99b50113c937de62e44c3b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 569aaa5481f863f9e8558fe8207aaff0f8ef89f1..35d44631ed22918acab2f4c5bada4959e36c33dc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0580652e8ab4a4fcc1c4b48d4b4fe61698a85dcc..327b534c05fa0155cf4099a805d2bb9023f74ea1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 78be82822f3ae6818efefcdacba9b0b298ba1a41..ba04107bff7fd01b439173bd4817bcb1194c28a0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c948ce21b1bf4d8cefd8b839c03cd8c05b492182..33d7486ce628cbf83d8f81a7d36b1f6b53a58ac0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 795594294e92591a22984383dba050a76b61517f..40786e3293d586838af319d8849ac265df1e65cf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e1705548204a976bfb73e74e750488374e00f5d4..50b3caa6141a8b82049b36be6c769e715eb87bd4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f420c9589d8d3b1c326560b469d3e941d337c10e..59ade8719c8e33f4d133ddf04f4aaabc19aa95b6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 375858798ab6a9f2fc39a77b5bcb6688cc94ab26..dcfbda32dd139a16ead731a8098a5dcf84c98581 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 97cf78967921f8bb10bc1c0d45bb8c7bc0969345..1235d86b90e57a1c0da9d3923b2c16db0cd09d0f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f1d3e9936c37e2631638c7104bdcbb8a08b4992f..76d12faf0932f7f39a2263ae4a5235ed7a9ba194 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b6056c9ce90b7a1ed644b8ad3d6b88633325e178..ae7cd69a95e37f73993ca0f7c485f09175f08287 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 875dad0b0a07ff6d24d77968df75e1b0084b07e4..2581685f93b85b8a7073f93361ec720538d22e3a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 654f85bd38b847cdb5efe5fe6ebca4bb188de86b..d79c08056688d63e560d8da3a51793b443ac9f8e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 18474e18d0947248c59d749cdb49768ef46d4e04..63c7a0ce960ddf0ef25e7487af3acb8b4d569f46 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5f56a899566d6e08cf47432e128e3857f848df75..cb1639113b3879baa85cfdc28fd1a26ec97450a2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 80b278247e03b6297effcf64ed7c2226267b47e3..9c2bcb10ca7f11b464bd0d759b578f505361f597 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e80bac6aa4efd88e18ff45fbb98188ae2b7b8d98..5d1b1b7f6c50f24ca023dbbbe83c9516d46e12bb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 739670f5b7a8d4e259bf119e35588fcec89c40f5..073144d4d9a94033ee8f03b2828d39c333b01ec0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 738519792bf79aa4f88fa1dc18e22f989cb49f2e..465c190c43883770b1dc2cdb466e65c6f6c901d8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 15cf7d641b0f68a3248de98c443096579fe5938b..fd2684db4c0ce6b06aa9392476b294a97ceb692d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bce2a8d96efdca47961b5e08454ac6111c32f561..5332aecd04822a33cd25eb7ac93b522afd6eaee2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1209c2a0ba0550f19888f1fe1870d48bef97c51e..e9698cbadedb2fa0b06c01eeab3a4ef5763baa76 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d526e6e51cee26a34cbc88eb3f825114968fd07b..0caefcd678a165e714b7e9cb3f53ce8f80578389 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8f0d06b0d229e13a0369d1f2852572ea9de4724d..a97fda2d0cbb5135601cafddba6aafe431cb21c7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 352f180836b1f4a61732197420421baa32b05fa5..6ded5461c93c80926e9494a32965c625d3abc609 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5f512e1485ccff844a793c92ca9ebbf355474965..9c5f8dae92bc529266e1ca002a4e0d970397a5a9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 256626f340aff28a0b5809cea57c231b2734835d..0cba86a31c5712e28e96cdc0ffdbf7f8ae363806 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index df41b7d9f2ca926a340dac4b67c309682c281df7..08c529860bd6da4f4985b903a3420a5c3ec1e55d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1cff3cd4a052cb5320deb98e31caa097a01a9a56..1199564020bbf57173443dad3e3d340a4d1712ba 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e5bcd1c6688ce2d7d9874e0a0b9da7c4956b96d..c81854347de7d17e62171a0e56d1d990ef9e74bd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ed0211a9fd78f7dee145f768d95a8a1c95a46d99..6ea5ec89897ab541bf1a2c7ca85328f806f65163 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 365db92dbc8750c827d2b71ef21f95333d29bf70..2dfc455aa5ca0d09adf7859d1581e6344ddfc405 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0d94383601dcaac67e81dfaceb78df70a7db52aa..53a10cc41ea6ed9a91b09083693a300d8ccd4442 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0ccc4e152d15a9e1d3b292171197d5f3fd4c8d90..e15043b4add4862724d6d7a8b184c5625864046b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8bca55fa6c3be3ffbbe62456eef7c4c3cd1f1b1f..74adb052c54d878bf9823e51e4a24654d1e7450d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c28d04d368b326d1cb93133bef15097b1c10226e..339043a66c3a3c0228471fb6a180ad46af5892db 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 370610b168039e936fae1c9af04eb1a2b6924fb9..6a93c2c3f262ad5bce24b5fe0dde0f028be0fff4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d88e6cac941310e395606f0813dfcd5aa20a99a0..6897f0e6d4273e740a51ad98e2773d0c0072197b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7a4a9f35fc433cfa5c3bdb1a4e7516e935899613..3c3e6a0104b6b24b5de437e0cc00f2b9a30c24e2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dea9c29e16950f9f138490bc6927505976f3be25..4f0d7130543d43e5d953fb130aca588a2fe008f9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2b261b708e54fdc3c15b9df3a7cadea133623f52..d63e81d1c835983b0f05c945d2853606cc12b665 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b46b30ad7fc28d95f21fac1693c90048140821fe..717a106a41e3793abcf65b2d2308c35ebd25323f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 89dbdf77ca30f5b8d7fc2796ef849325e99bfff9..e094810c38b806686cf0c5c788d3aecaabdbb7da 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f376a46304bb007301e8fd245ea32bd7ec237ba5..9f56001d2a48a761124e830e909809e4af1d04fb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fe16f4414c12ba86ae58fee3737fcea3de7e66ff..114abc76679343714191b09316ea607f806331f3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 12fecaa00a7efcd52b4c29583316c859f29191d5..a48c532b99fa9cd25eff3c31eb9a3395e46d60a1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5c9cea28a9db46235dc5e7811e67a1e31ad7e615..8031c8057ad71a4372d0662b8898dfc25240784c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a3a394d31f674ff1fc0b3dc26a7ba9ea3cc4cb24..691dc4de9812063df62aca4ef6171feb86cc44c2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1c8bfdb79402af700f02009d0685e002818f3165..c2cf409084e1ec5b44448830d0cfaf9a10369902 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 99f7e5ad72d49184e082ab6041cf077ce4f9cb04..a4f475cb321e355eaf2a5eb77b0940791e7efd9a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 382b6ae47809f9202521af7bb281a37bf6c66ae1..effc029983e6f09e34b721b981abe8bd18bddb12 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8bf257150802eeab11282c74c0d3caf42e5cd8f6..52815d6f79205da123ff7591c1677b8b993f6c1b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 63f502062d03e24be2e754baece5c35c4f6bf316..07802247c9e0d824d020f5b1e83b8eaa8ee0eb66 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4bfdb663d596a62101ddcd695d04d3dc6c70950a..2d4b216c12aa155de21897f8fcee912f9e0afdab 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6172749857d3eb9664d86394960db4af9eb2c79f..621db3c01203e43e39d2bce55c4790f2f77c83ea 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -197,6 +198,9 @@ public class AltosConfigTD implements ActionListener {
        final static int        serial_mode_save = 1;
        final static int        serial_mode_reboot = 2;
 
+       SerialData serial_data;
+       Thread serial_thread;
+
        class SerialData implements Runnable {
                AltosConfigTD   config;
                int             serial_mode;
@@ -206,9 +210,9 @@ public class AltosConfigTD implements ActionListener {
                                boolean been_there = false;
                                config.reset_data();
 
-                               for (;;) {
+                               while (config.serial_line != null) {
                                        config.serial_line.printf("c s\nf\nv\n");
-                                       for (;;) {
+                                       while (config.serial_line != null) {
                                                try {
                                                        String line = config.serial_line.get_reply(5000);
                                                        config.process_line(line);
@@ -255,6 +259,7 @@ public class AltosConfigTD implements ActionListener {
                                /* fall through ... */
                        case serial_mode_read:
                                get_data();
+                               serial_thread = null;
                                break;
                        }
                }
@@ -266,11 +271,17 @@ public class AltosConfigTD implements ActionListener {
        }
 
        void run_serial_thread(int serial_mode) {
-               SerialData      sd = new SerialData(this, serial_mode);
-               Thread          st = new Thread(sd);
-               st.start();
+               serial_data = new SerialData(this, serial_mode);
+               serial_thread = new Thread(serial_data);
+               serial_thread.start();
        }
 
+       void abort_serial_thread() {
+               if (serial_thread != null) {
+                       serial_thread.interrupt();
+                       serial_thread = null;
+               }
+       }
        void init_ui () throws InterruptedException, TimeoutException {
                config_ui = new AltosConfigTDUI(owner);
                config_ui.addActionListener(this);
@@ -279,6 +290,7 @@ public class AltosConfigTD implements ActionListener {
        }
 
        void abort() {
+               abort_serial_thread();
                if (serial_line != null) {
                        serial_line.close();
                        serial_line = null;
index 1c0e0fef60685281cf988dddc3289a62958a386b..529c2fa20ac1e74619145dcd2ae0ca33e03efd09 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cb7af82971d163ed06772711739c6be8b618af5c..e5f1949a4d2ac78c33160637c4a78275aee8cd69 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b4f423d91694e247bbf5a7b1f87b821699140e55..6aefb3a62f6a1f1faa2d69eda0dc08b6465afa2a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 44bceceee5dd6539ae4ef8c4083c2f35b5ce6166..0c3a8e9eea4cb3ac95dd411cc2ca4d7d5695151e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d1bc5fd72b72816dd15ca3d008672aafff9133fc..9e3b2a5a9c9a0ca2f75436ed92104336cecc6e4e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 82c63396a7ae724ff9ddd1d1d7185959c06bfc77..4288fc9feea97c9d647285b82a4e687356f7b7d9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dc5b96a9719192bfc5fad5a02d20bf61c22060b6..7b872df9a599d93115ac851ba0218a0caafcb201 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 88d6f0ff143191b7ad155a614dc108f43707f3c9..82ef43c2c8428052d30a987ce4ea47a6907b1e7b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 63f8c670762794c174946dc27f834dfb151f6906..cf03d2dc3732562185f8c4ca4c33bbd2c4b18acd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4f394d73fb932a617bc62a806e7b1ab313640768..4ca2b77c3781856898654d72cdb828493c5ea764 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 or any later version of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1a992946aed33ede8b5bff1806293b45c45c8077..4d5c3b2df7661f96c6f91b67a8e7120bcd7d830a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 84dc54dbe52e6d42c13843caf093e3208ed5cd75..15493b8a373c08c15cbbe0febf3c2234692a0776 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 13d99124528ba598062c160f8ab599649e939852..fabf43202eb3bbf26332ce750e54e4ff68b6a94c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 77c504b83792279b28c98e4424c6c28f0e7f0e00..ded085376fa3fb8ff35c302eaa17ba5b2e93b735 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fb2cd883fa97f37d9476e77c76c3fa6cbb0dd693..d4e73b3e994e78a2caf254b5da79255a78f2f434 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 22608c1b74066a0f8bafd9bf4ba5461ccb919062..835858e23230e17f4d4ab72bf64ed422cc147e26 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b6f1f3c9b0ec8a4f1f6fdc0e8e23be29029a0fad..d411c969a71eb2c2d348d7e43c0b292ad9dc165f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fa259906769a9da7101c9bf1c064ce43a21bab93..019bbb9e79e00dbcdbf7dc81229fd38aedabd27c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -545,14 +546,22 @@ public class AltosUI extends AltosUIFrame {
                        AltosStateIterable eef = record_iterable(file);
 
                        for (AltosState state : eef) {
-                               System.out.printf ("tick %d state %d height %g\n",
-                                                  state.tick, state.state(), state.height());
-                               if ((state.set & AltosState.set_gps) != 0)
-                                       System.out.printf ("time %g lat %g lon %g alt %g\n",
-                                                          state.time_since_boost(),
+                               if ((state.set & AltosState.set_gps) != 0) {
+                                       System.out.printf ("time %d %d-%d-%d %d:%d:%d lat %g lon %g alt %g\n",
+                                                          state.gps.seconds(),
+                                                          state.gps.year,
+                                                          state.gps.month,
+                                                          state.gps.day,
+                                                          state.gps.hour,
+                                                          state.gps.minute,
+                                                          state.gps.second,
                                                           state.gps.lat,
                                                           state.gps.lon,
                                                           state.gps.alt);
+                               } else {
+                                       System.out.printf ("tick %d state %d height %g\n",
+                                                          state.tick, state.state(), state.height());
+                               }
                        }
 
                } catch (Exception e) {
index cfe3bb5b54c39654e7e0b16747661a39d03dd6f7..c3892d225a2b1da3fea2094f3e3f983d203a5e9f 100644 (file)
@@ -126,6 +126,8 @@ FIRMWARE_TM_1_0=$(top_srcdir)/src/telemetrum-v1.0/telemetrum-v1.0-$(VERSION).ihx
 FIRMWARE_TM_1_1=$(top_srcdir)/src/telemetrum-v1.1/telemetrum-v1.1-$(VERSION).ihx
 FIRMWARE_TM_1_2=$(top_srcdir)/src/telemetrum-v1.2/telemetrum-v1.2-$(VERSION).ihx
 FIRMWARE_TM_2_0=$(top_srcdir)/src/telemetrum-v2.0/telemetrum-v2.0-$(VERSION).ihx
+#FIRMWARE_TM_3_0=$(top_srcdir)/src/telemetrum-v3.0/telemetrum-v3.0-$(VERSION).ihx
+#FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2) $(FIRMWARE_TM_2_0) $(FIRMWARE_TM_3_0)
 FIRMWARE_TM=$(FIRMWARE_TM_1_0) $(FIRMWARE_TM_1_1) $(FIRMWARE_TM_1_2) $(FIRMWARE_TM_2_0)
 
 FIRMWARE_TELEMINI_1_0=$(top_srcdir)/src/telemini-v1.0/telemini-v1.0-$(VERSION).ihx
index c85e2ac8bd3aef607e42066d0dc18870729eccac..e96250d75a325ece92111f3f95d223c32a738aff 100644 (file)
@@ -124,6 +124,7 @@ Section "Firmware"
        File "../src/telemetrum-v1.1/telemetrum-v1.1-${VERSION}.ihx"
        File "../src/telemetrum-v1.2/telemetrum-v1.2-${VERSION}.ihx"
        File "../src/telemetrum-v2.0/telemetrum-v2.0-${VERSION}.ihx"
+;      File "../src/telemetrum-v3.0/telemetrum-v3.0-${VERSION}.ihx"
        File "../src/telemini-v1.0/telemini-v1.0-${VERSION}.ihx"
        File "../src/telegps-v1.0/telegps-v1.0-${VERSION}.ihx"
        File "../src/teledongle-v0.2/teledongle-v0.2-${VERSION}.ihx"
index df00bcee7e6861ad959bc936b1d77d26e5792d94..313cf0a0fa626d303360e879df8624145003315b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 75ca18ed11738695dbefcdf889fee92b3f9a07e1..1ea31950bf970822b077e3125009a5a5c5bff708 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 11b0d48dfd06d312778804b6acd5944e43dfbd86..32cc05d70064e30b9853fda6547e07fc2707f508 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bdb35d499bb62fa597e782399f7390e188226904..14e0a056f19d7abf44ec4b4f92e0b46da0bd3208 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d67ce8dacbbf4226cfe2663b7f84a7d2d9494bc..1b769740cbadb6343fb9a307fe104055e7161cc0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b8477ecd82f6b07e82978311c8697d251a69946e..c4d2abba26c81fa153a204104de27b9675708cfb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f1a5610e5a57108d9379c04d756f95afab2a38eb..8758fc34df213d000f3e770fd7499b5679f15e9a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f51c76c2e0e34d2abea602dda82afb9b54162056..f9878fe94739130b237d1e6e71430b50a216d314 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0cd658c0f57385933912b5a9d9be6dbf5989759d..5d8ff570f747f772598538e0dd594e0df16a42ea 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7d1e361816c60eb7f307946dad680a34f1ea5ca6..c2d6f4f38b63b00abb4f594fde05d074353dd780 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ba48ab820b4c4e209910ad4172fa5e3a7b1c0a63..52414c62038e155b2305a66559cff2cf84f3954f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 026b5da497bf2f7b9987503eb5b5d75135de96db..24337be4a784b9f5e0f192c5add24b6a18275cfa 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a4b62ff0a18d09c95513f8375dc630c190153391..a6636c4f5acde715c448f935a367ecae07b15468 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7fe5be1837dd51d71ee94f07aef9275a99f6b7e4..d61169f4f8ef56b2f52034920e14c82de38369dc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9492bc311d39b4570ba221fd1cdf20568f404dab..d708ae96aaca11891fd9a5ccdff1df16ca88289e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 28b3982b8a2c4cfa9060924e2b22959c0c2f9ade..0b4b7a85f19ae74b563f20fb97ee8d7224216b12 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6574bd9913175b6d76185d088b6b964615a40495..da36397abc7f7bda1c46ab3e81482d1a8cba2f0c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ca3728a557268f969fdabd6ef1521536bf195fa6..2d371101388029f56fbdc056de681045d5e9fab2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c0f1ecb6aebebcf603fc74209248bb150924178f..2f46f231cbc0221dc9ffb1a3520f854eeb23bbb5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ad843f7fe86e0376787ec1218a169e8f9eae4387..23fa1ffee999eee684bbc418f4b6f727c3bb321f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fcb883886f553c690932e16792bb8a1693bc2846..0012d96a145598bc6128d0e85d7328e7809d5ef8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3e3bf479a70435a09d1f2dc43f8dbaf2b50e49f0..065a7815626fd6d815f303e32a4fa372c8c510e6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3509f65da60400f9b5e4623602cae9c8cb24f6f0..7ede28244e5f8748e0ba3b800b8a0c313883fb0f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b1dc32209a527c9d585b5ed9eaeba7e684124192..c06e45e5e9b15028f496acebae1a6feafc33c6b4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 34293bb49ce3c13a99f91c64009dc80a6c3be67f..394cfc67912728b758e95c54d17a6ebd9377ff49 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8eb4594aa02174aa2bceed2d1bf8eb6bf717654f..8c4d25166b98f9cb154543037977dc6948532157 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 33686b4f53f0fdf405d7271b150595bfad97779f..c1b8ac26100ca645d498886c0297a2640523d1ff 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ee68fbc94754951de52234307f0c2bcc66353543..8843429a6113b6be45d2cc8f1a974f11fec82561 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1bf4dbbee721df5ea9d6dc208f88b4ceeaaa3898..5c32a7d8448512e3bed8e394bd9e62fbb05f777f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cba5cac0c19e6891b885554b53f3c03c4d5dadd1..e0de8ad79c13d58db0dd3293cfcb29af23518fb3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8ec8a11488876b22816ebcb09ec38149a220f8de..e41667ef906f4f038b9325623ca050ba0638f318 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index de07047354af50cac2c8e469eebea4809cde3a3a..19512f49b3ce07d1e75f121b5be62868a433aa4d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 44668dff64b2e275c864399ebcbb7ce63da6f1c6..a59cc0a042e0b1f18e6a3cba8b02207706b1ca7a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7d905b4623d49e3a6809e218e0ee33be9b0a2fbd..4107feae6945148df7aac3be686710f640ddfc6f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8c7bcf03af62b2be351993c7fe5e04fb4ae8f2b6..ffab46c1a186330ab05ae008c01ebbab035d1b44 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2fd464984312fcb949fd97da19f8b0dbf945da5b..85b402293edbd73c151fd353877927293afd3401 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 74de4bf556e769ee59aa15f0d2d3bda128cf6f05..4c733b9601496f5d1b54b5d2c6ac021253a147ac 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1e32445005eaf0741ddf1b580de89dca10b785db..3adbdb336b703e707816d4d8eb3b2dd9a4062bcd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ac440190b69e8ec3c47a38f8a963a5599589b20a..e5007fff78bd5aacb4ac73af9055b847ae4c3bb3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c770f65458bf46328a61f25077022e6c20fdccb2..4dd9fece0e1b483477c40ba467fbc6229e909537 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9c2577637caa59fa0ecd12a8d5e5942686747a97..d37603846595d0bd4fca46e9d9c7967a9377444d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1acf5c4653ca4114920f4be1564d465892e37506..0735814448075aa6b5c7761cfc34ee99b13e9ba6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 700e095f97c9dcbe5ca96e0a1c734d229eb60479..b157a2ce8dd4e2f8b3b2255db8875a5ca03c295e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a91a7e660dc4d859c5226ca63b08342610a25015..f47a2f29797041aa6698ed4cd786c1e501ea998d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5eefdc98ecfd78c84127bdce18faadd85cbcdac5..0c5fa1c7df3992a732230fe83992482826d29d0f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 581711adc58dbe5e07eeb0866c70de889c204aee..55ce584ae3d90a7bb0d2ea6d4f064447d4eff507 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8c90bcd8d8a86ddd7549da7b90ec93ab669e9aaa..3e4cbe9b8a3e657860c308a52e7a5210313904b0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 326900372638515ad53b47415d4ca268fa7ae02f..06c4c59bcf406590f3edf18b5d59d0a230144565 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 84130562d447b210f05593f6775c27b77278dcf7..9d8dde6062d135678c04eaf021a1f9f84e312180 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 841727115902280fd1a6bb3ba0ac2730102b5cb8..c8ae9a7d5cc8884b52d19a8af080f3db40fc5041 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3d212dc5af61adaed24b3c6c516ac09ab362b940..6dd2baaf15f55b383010df122e20fd641fd3be28 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8919804e760e6d1c0f3442ec9e0ee9ac838ec840..187977d39562e6ba31ff11401ac962e0b93ce4f5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3a1dde03c73c24a76367c5210085f3a2824a9b6d..66cc7d69a6133ffe3540f576d15f690bb8959e55 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a2599acde5d39d7f01d109a39387b6f1b1542049..f02d2f7f069607e8e1033e7d573e06ff9b839803 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 63af57257c8c4dfcb94bf72940a1d835c3652b0b..d4dd18db0b2fead58625919270fdfc067de7ee6b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -82,6 +83,7 @@ public abstract class AltosUIUnitsIndicator extends AltosUIIndicator {
        public void show (AltosState state, AltosListenerState listener_state) {
                double[] v = new double[values.length];
 
+               hide = false;
                for (int i = 0; i < values.length; i++) {
                        if (state != null)
                                v[i] = value(state, listener_state, i);
index 852b594d25adbab2a941fe5739f158f5d6e5356f..299c6114b18877a4b2bac2d7dae04431ac711d84 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ea4f9f3c5ce54bb90abee486e283720742c48aa8..221ac829727715c08d02b10d4f47c48fb9ecddb2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 33a06a4e80ba1660d58b077a04855bc265699ad8..c651aa35b114207b417fb78ae1c6bd8266888fde 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 804425a32a613f099ac563804db23260c74ae8a1..0e57fe4d1cf1097b75eee8084913e8095b56fd65 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 99fa4fbad97f389d874d147b5eb8b5ac4f5af462..23a1d607c732195e4314202958bfb75bdf80c3fd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5dababde913d737aef53efebc250a104d01fb9d0..e30608ab3abb3cfd38105536cbf0961529cb24ed 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1e4c143d2167ecc8698feec6c27ae0d60b2328b2..b53b971d312673403759b8fc80a19940fa04bc80 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 11932506cf7c88c6cb0978e997051b991c6a96c5..fe8dd90b33d9870cff3192e67dd20ba1eb18ff87 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8efb03cc33401c400bff26c303f97a6864092d05..de14021316b5fa33a5161bdc1180f123e2c133a4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index be3333affe121f498439a577447951d80e45caf7..bca83ae8fe78d01d654f8fcbf03b1e5c8fccc0a2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ao-bringup/test-chaoskey b/ao-bringup/test-chaoskey
new file mode 100755 (executable)
index 0000000..b4c8164
--- /dev/null
@@ -0,0 +1,95 @@
+#!/bin/bash
+snum="unknown"
+case "$#" in
+    1)
+       case "$1" in
+           "-?"|"--help")
+               echo "Usage: $0 [serial]"
+               exit 0
+               ;;
+       esac
+       snum="$1"
+       serial="--serial $1"
+       ;;
+    0)
+       snum=`dmesg | grep 'on chaoskey' | tail -1 | sed 's/.*chaoskey \([0-9a-f][0-9a-f]*\) on chaoskey.*/\1/'`
+       case "$snum" in
+           "")
+               serial=""
+               ;;
+           *)
+               serial="--serial $snum"
+               ;;
+       esac
+       ;;
+    *)
+       echo "Usage: $0 [serial]"
+       exit 1
+       ;;
+esac
+
+echo -e '\e[34mTesting ChaosKey' $snum '\e[39m'
+
+tests="0:100 1:100 2:100 3:100 12:10 13:100 15:10000 16:250 202:1000 203:100 204:500 206:20 207:1000:32 209:1000"
+
+PASS=0
+FAIL=0
+WEAK=0
+../ao-tools/ao-chaosread/ao-chaosread $serial --infinite --bytes | for test in $tests done; do
+    case $test in
+       *:*:*)
+           dnum=`echo $test | sed 's/:.*$//'`
+           tnum=`echo $test | sed 's/^[^:]*://'`
+           tnum=`echo $test | sed 's/^[^:]*://' | sed 's/:.*$//'`
+           nnum=`echo $test | sed 's/^.*://'`
+           opts="-d $dnum -t $tnum -n $nnum"
+           ;;
+       *:*)
+           dnum=`echo $test | sed 's/:.*$//'`
+           tnum=`echo $test | sed 's/^.*://'`
+           opts="-d $dnum -t $tnum"
+           ;;
+       *)
+           dnum=$test
+           opts="-d $dnum"
+           ;;
+    esac
+    case $dnum in
+    done)
+       echo DONE
+       ;;
+    *)
+       echo TEST $dnum
+       dieharder -g 200 $opts
+       ;;
+    esac
+done | while read result; do
+    case "$result" in
+       TEST*)
+           testnum=`echo $result | sed 's/TEST //'`
+           ;;
+       *PASSED*)
+           PASS=`expr $PASS + 1`
+           ;;
+       *WEAK*)
+           WEAK=`expr $WEAK + 1`
+           ;;
+       *FAILED*)
+           echo test $testnum failed
+           FAIL=`expr $FAIL + 1`
+           ;;
+       DONE)
+           echo pass $PASS weak $WEAK fail $FAIL
+           case $PASS:$FAIL in
+               [1-9]*:0)
+                   echo -e '\e[32m'ChaosKey $snum is ready to ship'\e[39m'
+                   exit 0
+                   ;;
+               *)
+                   echo -e '\e[31m'ChaosKey $snum failed'\e[39m'
+                   exit 1
+                   ;;
+           esac
+           ;;
+    esac
+done
index 8c20ebaa83854a450f50a6910e07c7e9f3410823..990382f48e56cc268905999596427204bf24e1a8 100755 (executable)
@@ -24,10 +24,17 @@ echo "Expectations:"
 echo "\tChaosKey v$VERSION powered from USB"
 echo
 
-$DFU_UTIL -a 0 -s 0x08000000:leave -D ../src/chaoskey-v$VERSION/flash-loader/chaoskey-v$VERSION*.bin || exit 1
+FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin
+ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf
+
+$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
 
 sleep 2
 
-$USBLOAD --serial=1 ../src/chaoskey-v$VERSION/chaoskey-v$VERSION*.ihx || exit 1
+$USBLOAD --serial=1 $ALTOS_FILE || exit 1
+
+sleep 1
+
+./test-chaoskey
 
 exit $?
index 62f51fba1f8ce7346af03838b65842fafc7ff43a..e2b539e1a2ef7356a341a4041010d43af162a76e 100755 (executable)
@@ -16,17 +16,31 @@ fi
 
 VERSION=2.0
 REPO=~/altusmetrumllc/Binaries
+PRODUCT=TeleMega
 
-echo "TeleMega v$VERSION Turn-On and Calibration Program"
+echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
 echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"
 echo
 echo "Expectations:"
-echo "\tTeleMega v$VERSION powered from USB"
+echo "\t$PRODUCT v$VERSION powered from USB"
 echo "\t\twith ST-Link-V2 cabled to debug header"
 echo "\t\twith coax from UHF to frequency counter"
 echo
-echo -n "TeleMega-$VERSION serial number: "
-read SERIAL
+
+case $# in
+    1)
+       SERIAL="$1"
+       echo "$PRODUCT-$VERSION serial number: $SERIAL" 
+       ;;
+    0)
+       echo -n "$PRODUCT-$VERSION serial number: "
+       read SERIAL
+       ;;
+    *)
+       echo "Usage: $0 <serial-number>" 1>&2
+       exit 1;
+       ;;
+esac
 
 echo $FLASH_STM
 
@@ -54,7 +68,11 @@ echo 'E 0' > $dev
 
 SERIAL=$SERIAL ./cal-freq $dev
 
-../ao-tools/ao-cal-accel/ao-cal-accel $dev
+failed=1
+while [ $failed = 1 ]; do
+    ../ao-tools/ao-cal-accel/ao-cal-accel $dev
+    failed=$?
+done
 
 echo 'E 1' > $dev
 
index ba40a08a363b763f38ef95555ebf48a3b8196a82..5c62c49d623b1871616c940fabc98658545ddc90 100755 (executable)
@@ -15,17 +15,32 @@ else
 fi
 
 VERSION=2.0
+PRODUCT=TeleMetrum
 
-echo "TeleMetrum v$VERSION Turn-On and Calibration Program"
+echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
 echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"
 echo
 echo "Expectations:"
-echo "\tTeleMetrum v$VERSION powered from USB"
+echo "\t$PRODUCT v$VERSION powered from USB"
 echo "\t\twith ST-Link-V2 cabled to debug header"
 echo "\t\twith coax from UHF to frequency counter"
 echo
-echo -n "TeleMetrum-$VERSION serial number: "
-read SERIAL
+echo -n "$PRODUCT-$VERSION serial number: "
+
+case $# in
+    1)
+       SERIAL="$1"
+       echo "$PRODUCT-$VERSION serial number: $SERIAL" 
+       ;;
+    0)
+       echo -n "$PRODUCT-$VERSION serial number: "
+       read SERIAL
+       ;;
+    *)
+       echo "Usage: $0 <serial-number>" 1>&2
+       exit 1;
+       ;;
+esac
 
 echo $FLASH_STM
 
@@ -53,7 +68,11 @@ echo 'E 0' > $dev
 
 SERIAL=$SERIAL ./cal-freq $dev
 
-../ao-tools/ao-cal-accel/ao-cal-accel $dev
+failed=1
+while [ $failed = 1 ]; do
+    ../ao-tools/ao-cal-accel/ao-cal-accel $dev
+    failed=$?
+done
 
 echo 'E 1' > $dev
 
index 9a98864887835d3de956eef5bc3140986a4e41eb..8a9e634727e842e70912eda45775d8d6d2ce7466 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 464faf0f8320a63587cdf79b1e4a5d441e2ad24d..12c2a3ae9f6c845b809025a37068844d7d1c7e8b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,13 +39,13 @@ static const struct option options[] = {
        { .name = "tty", .has_arg = 1, .val = 'T' },
        { .name = "device", .has_arg = 1, .val = 'D' },
        { .name = "raw", .has_arg = 0, .val = 'r' },
-       { .name = "verbose", .has_arg = 1, .val = 'v' },
+       { .name = "verbose", .has_arg = 0, .val = 'v' },
        { 0, 0, 0, 0},
 };
 
 static void usage(char *program)
 {
-       fprintf(stderr, "usage: %s [--verbose=<verbose>] [--device=<device>] [-tty=<tty>]\n", program);
+       fprintf(stderr, "usage: %s [--verbose] [--device=<device>] [-tty=<tty>]\n", program);
        exit(1);
 }
 
@@ -167,7 +168,8 @@ await_key(void)
 }
 
 int
-do_cal(struct cc_usb *usb) {
+do_cal(char *tty) {
+       struct cc_usb *usb = NULL;
        struct flash    *b;
        char    line[1024];
        double  measured_freq;
@@ -177,10 +179,17 @@ do_cal(struct cc_usb *usb) {
        int     cur_freq;
        int     cur_cal;
        int     new_cal;
-
-       cc_usb_printf(usb, "E 0\n");
+       int     ret = 1;
 
        for(;;) {
+               usb = cc_usb_open(tty);
+
+               if (!usb)
+                       exit(1);
+
+               cc_usb_printf(usb, "E 0\n");
+
+               cc_usb_sync(usb);
                cc_usb_printf(usb, "C 1\n");
                cc_usb_sync(usb);
 
@@ -201,7 +210,8 @@ do_cal(struct cc_usb *usb) {
 
                if (!cur_cal_words || !cur_freq_words) {
                        printf("no response\n");
-                       return 0;
+                       ret = 0;
+                       break;
                }
 
                cur_cal = atoi(cur_cal_words[2]);
@@ -217,8 +227,11 @@ do_cal(struct cc_usb *usb) {
 
                cc_usb_printf (usb, "c f %d\nc w\n", new_cal);
                cc_usb_sync(usb);
+               cc_usb_close(usb);
        }
-       return 1;
+       if (usb)
+               cc_usb_close(usb);
+       return ret;
 }
 
 int
@@ -231,14 +244,13 @@ main (int argc, char **argv)
        int                     i;
        int                     c;
        int                     tries;
-       struct cc_usb           *cc = NULL;
        char                    *tty = NULL;
        int                     success;
        int                     verbose = 0;
        int                     ret = 0;
        int                     expected_size;
 
-       while ((c = getopt_long(argc, argv, "rT:D:c:s:v:", options, NULL)) != -1) {
+       while ((c = getopt_long(argc, argv, "vrT:D:c:s:", options, NULL)) != -1) {
                switch (c) {
                case 'T':
                        tty = optarg;
@@ -269,12 +281,6 @@ main (int argc, char **argv)
        if (!tty)
                tty="/dev/ttyACM0";
 
-       cc = cc_usb_open(tty);
-
-       if (!cc)
-               exit(1);
-
-       if (!do_cal(cc))
+       if (!do_cal(tty))
                ret = 1;
-       done(cc, ret);
 }
index 806c2ef9e57f3b1018f886d90ecf0e48964f9671..7808f6c91d5cdad2689219951ac117ff96bc6392 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -90,7 +91,6 @@ chaoskey_match(libusb_device *dev, char *match_serial)
        return handle;
 
 out:
-       free(device_serial);
        if (handle)
                libusb_close(handle);
        return 0;
@@ -182,15 +182,16 @@ chaoskey_transfer_callback(struct libusb_transfer *transfer)
 #define ENDPOINT       0x86
 
 int
-chaoskey_read(struct chaoskey *ck, uint8_t *buffer, int len)
+chaoskey_read(struct chaoskey *ck, void *buffer, int len)
 {
+       uint8_t *buf = buffer;
        int     total = 0;
 
        while (len) {
                int     ret;
                int     transferred;
 
-               ret = libusb_bulk_transfer(ck->handle, ENDPOINT, buffer, len, &transferred, 10000);
+               ret = libusb_bulk_transfer(ck->handle, ENDPOINT, buf, len, &transferred, 10000);
                if (ret) {
                        if (total)
                                return total;
@@ -200,19 +201,21 @@ chaoskey_read(struct chaoskey *ck, uint8_t *buffer, int len)
                        }
                }
                len -= transferred;
-               buffer += transferred;
+               buf += transferred;
        }
 }
 
 static const struct option options[] = {
        { .name = "serial", .has_arg = 1, .val = 's' },
        { .name = "length", .has_arg = 1, .val = 'l' },
+       { .name = "infinite", .has_arg = 0, .val = 'i' },
+       { .name = "bytes", .has_arg = 0, .val = 'b' },
        { 0, 0, 0, 0},
 };
 
 static void usage(char *program)
 {
-       fprintf(stderr, "usage: %s [--serial=<serial>] [--length=<length>[kMG]]\n", program);
+       fprintf(stderr, "usage: %s [--serial=<serial>] [--length=<length>[kMG]] [--infinite] [--bytes]\n", program);
        exit(1);
 }
 
@@ -220,16 +223,18 @@ int
 main (int argc, char **argv)
 {
        struct chaoskey *ck;
-       char    buf[1024];
+       uint16_t        buf[512];
        int     got;
        int     c;
        char    *serial = NULL;
        char    *length_string;
        char    *length_end;
        unsigned long   length = sizeof(buf);
-       int             this_time;
+       int     this_time;
+       int     infinite = 0;
+       int     bytes = 0;
 
-       while ((c = getopt_long(argc, argv, "s:l:", options, NULL)) != -1) {
+       while ((c = getopt_long(argc, argv, "s:l:ib", options, NULL)) != -1) {
                switch (c) {
                case 's':
                        serial = optarg;
@@ -246,6 +251,12 @@ main (int argc, char **argv)
                        else if (strlen(length_end))
                                 usage(argv[0]);
                        break;
+               case 'i':
+                       infinite = 1;
+                       break;
+               case 'b':
+                       bytes = 1;
+                       break;
                default:
                        usage(argv[0]);
                        break;
@@ -256,16 +267,24 @@ main (int argc, char **argv)
        if (!ck)
                exit(1);
 
-       while (length) {
+       if (bytes)
+               length *= 2;
+
+       while (length || infinite) {
                this_time = sizeof(buf);
-               if (length < sizeof(buf))
+               if (!infinite && length < sizeof(buf))
                        this_time = (int) length;
                got = chaoskey_read(ck, buf, this_time);
                if (got < 0) {
                        perror("read");
                        exit(1);
                }
-               write(1, buf, got);
+               if (bytes) {
+                       int i;
+                       for (i = 0; i < got / 2; i++)
+                               putchar((buf[i] >> 1 & 0xff));
+               } else
+                       write(1, buf, got);
                length -= got;
        }
        exit(0);
index 3f6830e7518377520732b93ff379973e012e06df..e2795ede180908ac11acb1b2ff93c4e24ba80660 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index db8f86f1569640fffebdbf04018054d670a5bacd..265908c59e20f8ceabbead38ee065eab622967b1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4c065e797f992fc5b5a254f971ea5440498f2fdd..0a970070823edcdbb71993b477fdd5c7e0fb8287 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 31ce18890d87f0ece7ff3ea36780e2866b6665d5..e33f2d1a7f149dbfef4c91ec2d5b10586c1738b2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cfb58bb433ce13022b4f3e681cfdb5f1c022ae80..9a12609b1f414d0208211b2b6a1babd4506378af 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ef6f892c1387f4a00b7e4fe75da2dbf220bbadb4..a4fc85b7300d8f15b4e6483dd26ca02c16f7e05a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 04cfec35794899a9e7a800480e3aee9df0556b75..d728d0c22413cb30dde726b1e8309cb5417e7d48 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 32571f0e4d828db52deda5d1cb6ce1b9edbc61f3..4015193951b83f485745e0586d3191130001ec03 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 55cb2cb6590d555de0898df0b75386eb6ce65687..7dbb69548b92cf7b259d8a42c8f180f75918f012 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 77f4c742c34d3d11cdef4cd13bc93e8bdefd9415..6dcbbf7242e2df334b77f554d7a2b76fbd5e3dec 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7230bf8c194a9dbc48f367ea737637363978f877..94b0b156502149e171f041258e50de764cc733ae 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6d00f58c0ce9f0121ae81534f320ee67a3cf9336..7acdc55c9b0e52ef61b2a401efbe1112540ee40c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4210a11150419c0f25bc0028ca123dcc2de5c2c5..18fa94ff24b8127946e470ccafc91487b647e52e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1ba9a9775143e1c675de12521efd840c11757946..bd59d66de4624b230ccf68ffd33d947ab70d1b78 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 05a69542d53b7c97a436df77d85dd4f59811ef12..aa54a1b9a4ffe5b0a1906ff211e659197118d463 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b3058b80fefbb9290ad6c761505868e4fa66e38e..d2b81e4f98fd0d8178e1803ad737194f905cc8e9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cf44ae69c500e8595b2d0e3441013cceaec982b5..5cbc56d750ae6f4b6e19da8c1cf6562b3d71e6a6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 84ed713d640c95614efd7bc7fb30f5ac8321c238..5012028c15bfe088bf67aad2a6ed9ccf5962f05c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 419c89482c84d721af51bf6e26f91d3a7652312a..c426e1bd28d34742e6034308f5c75ee9d79eac34 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b217e55aae6d4fa11346379b78a551d159f18b5..758eb6961ca21a2acd5d525bf98109ce1c103a9d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -40,7 +41,6 @@ get_uint16(struct cc_usb *cc, uint32_t addr)
 {
        uint16_t        result;
        result = ao_self_get_uint16(cc, addr);
-       printf ("read 0x%08x = 0x%04x\n", addr, result);
        return result;
 }
 
@@ -54,7 +54,6 @@ get_uint32(struct cc_usb *cc, uint32_t addr)
        uint32_t        result;
 
        result = ao_self_get_uint32(cc, addr);
-       printf ("read 0x%08x = 0x%08x\n", addr, result);
        return result;
 }
 
@@ -87,12 +86,13 @@ static const struct option options[] = {
        { .name = "serial", .has_arg = 1, .val = 's' },
        { .name = "verbose", .has_arg = 1, .val = 'v' },
        { .name = "wait", .has_arg = 0, .val = 'w' },
+       { .name = "force", .has_arg = 0, .val = 'f' },
        { 0, 0, 0, 0},
 };
 
 static void usage(char *program)
 {
-       fprintf(stderr, "usage: %s [--raw] [--verbose=<verbose>] [--device=<device>] [-tty=<tty>] [--cal=<radio-cal>] [--serial=<serial>] [--wait] file.{elf,ihx}\n", program);
+       fprintf(stderr, "usage: %s [--raw] [--verbose=<verbose>] [--device=<device>] [-tty=<tty>] [--cal=<radio-cal>] [--serial=<serial>] [--wait] [--force] file.{elf,ihx}\n", program);
        exit(1);
 }
 
@@ -115,6 +115,48 @@ ends_with(char *whole, char *suffix)
        return strcmp(whole + whole_len - suffix_len, suffix) == 0;
 }
 
+static int
+ucs2len(uint16_t *ucs2)
+{
+       int     len = 0;
+       while (*ucs2++)
+               len++;
+       return len;
+}
+
+int
+putucs4(uint32_t c, FILE *file)
+{
+       char d;
+       int     bits;
+
+            if (c <       0x80) { d = c;                         bits= -6; }
+       else if (c <      0x800) { d= ((c >>  6) & 0x1F) | 0xC0;  bits=  0; }
+       else if (c <    0x10000) { d= ((c >> 12) & 0x0F) | 0xE0;  bits=  6; }
+       else if (c <   0x200000) { d= ((c >> 18) & 0x07) | 0xF0;  bits= 12; }
+       else if (c <  0x4000000) { d= ((c >> 24) & 0x03) | 0xF8;  bits= 18; }
+       else if (c < 0x80000000) { d= ((c >> 30) & 0x01) | 0xFC;  bits= 24; }
+       else return EOF;
+
+       if (putc (d, file) < 0)
+               return EOF;
+
+       for ( ; bits >= 0; bits-= 6)
+               if (putc (((c >> bits) & 0x3F) | 0x80, file) < 0)
+                       return EOF;
+
+       return 0;
+}
+
+static void
+putucs2str(uint16_t *ucs2str, FILE *file)
+{
+       uint16_t        ucs2;
+
+       while ((ucs2 = *ucs2str++) != 0)
+               putucs4(ucs2, file);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -145,8 +187,9 @@ main (int argc, char **argv)
        int                     num_file_symbols;
        uint32_t                flash_base, flash_bound;
        int                     has_flash_size = 0;
+       int                     force = 0;
 
-       while ((c = getopt_long(argc, argv, "wrT:D:c:s:v:", options, NULL)) != -1) {
+       while ((c = getopt_long(argc, argv, "wrfT:D:c:s:v:", options, NULL)) != -1) {
                switch (c) {
                case 'T':
                        tty = optarg;
@@ -173,6 +216,9 @@ main (int argc, char **argv)
                case 'v':
                        verbose++;
                        break;
+               case 'f':
+                       force = 1;
+                       break;
                default:
                        usage(argv[0]);
                        break;
@@ -322,6 +368,48 @@ main (int argc, char **argv)
                        }
                }
 
+               if (!force && was_flashed) {
+                       struct ao_usb_id        new_id, old_id;
+                       uint16_t                *new_product, *old_product;
+                       int                     new_len, old_len;
+
+                       if (!ao_heximage_usb_id(load, &new_id)) {
+                               fprintf(stderr, "Can't get new USB id\n");
+                               done(cc, 1);
+                       }
+
+                       if (!ao_self_get_usb_id(cc, &old_id)) {
+                               fprintf(stderr, "Can't get old USB id\n");
+                               done(cc, 1);
+                       }
+                       if (new_id.vid != old_id.vid || new_id.pid != old_id.pid) {
+                               fprintf(stderr, "USB ID mismatch (device is %04x/%04x image is %04x/%04x)\n",
+                                       old_id.vid, old_id.pid, new_id.vid, new_id.pid);
+                               done(cc, 1);
+                       }
+
+                       new_product = ao_heximage_usb_product(load);
+                       if (!new_product) {
+                               fprintf(stderr, "Can't get new USB product name\n");
+                               done(cc, 1);
+                       }
+                       old_product = ao_self_get_usb_product(cc);
+                       if (!old_product) {
+                               fprintf(stderr, "Can't get existing USB product name\n");
+                               done(cc, 1);
+                       }
+                       new_len = ucs2len(new_product);
+                       old_len = ucs2len(old_product);
+                       if (new_len != old_len || memcmp(new_product, old_product, new_len * 2) != 0) {
+                               fprintf(stderr, "USB product mismatch (device is ");
+                               putucs2str(new_product, stderr);
+                               fprintf(stderr, ", image is ");
+                               putucs2str(old_product, stderr);
+                               fprintf(stderr, ")\n");
+                               done(cc, 1);
+                       }
+               }
+
                if (!ao_editaltos(load, serial, cal))
                        done(cc, 1);
        }
index 1ba9a9775143e1c675de12521efd840c11757946..bd59d66de4624b230ccf68ffd33d947ab70d1b78 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 456885d9b4871b205d3d5cad13e8f7c2921fb7ec..0362f1b46af98560dc220181e36afa64392b9f3d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c302ad0db1be69a3a34b4cd86720324a2c0ef2c8..2a3c1beb2dde45e8cfaea49495daa80aba245eca 100644 (file)
     <property name="copyright" translatable="yes">Copyright &#xA9; 2009 Keith Packard</property>
     <property name="comments" translatable="yes">AltOS data capture and display.</property>
     <property name="website">http://altusmetrum.org</property>
-    <property name="license" translatable="yes">AoView is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
+    <property name="license" translatable="yes">AoView is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 
 AoView is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
index b937df7c51575eee2482e8e2d424c85f3bbbedcb..633598929bff9e8ecf2069cba8e0423e55ba0cfc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 959173ca15c58423bbf0408633b9e0716c6ea426..06d28214f609f45773c4109fc141b7370746e5d8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8ee05e1d20384baccfc1e14d2f5b64e5ee78b635..e0c072e8293eca66c9f637efa5aac54e637e3b08 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2ea4320386ad9e549c7c0e11a1df895a5a6c69a7..3c0a7c73ec9d68f0822f47bc40fd75fb0f06b9e5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 447b83a435dd5c89a6ab4367730849a6f2b29e1d..99da1a6b1e554c759b3495278d9db82361ca60b2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 292887a02a5e6f97a7c9a3db11ea55f112f3c6a5..ade52263b4654393065eac129329b0e7c7decd5e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index abcdc491f5ee2d482d0691e17a20a1551ec16663..938bcb7755d2b54721fe17ad0313aa286dcb90da 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 24313626528fec18fb7df01c88c8dfb0cbfcec6a..423d018fd4ef5495b23ee367d251a86c44d4d556 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2880ecb11e288e03aec6b36aab7a118c698d9a1a..fd6b33241bca448559f1ce1c2d528057626611ad 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f8704b89dcb77b7140db98d8d51b610d4473b7c5..a197b3e66c16fe5d7dce95e41f0a1a45c32aa0a8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1f9937b25dea5b520f221b4e5bf52f2ff8c16b88..c7f170453b11910c22a4815ae252fb9e834b2215 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index da7b5d6a6cce83a439fe43737752ef4203b03fe5..bfdd8d467af8cbb77552108c04812fd8a0cd9542 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 29038b79af6ea747af0da5bd222ed33acb5275ea..f560da9a07eb89cbd527d5bb8503be06dc35e0cf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 505bcddcb1477487735d5f459c76f07a46cf2819..8cf99d0b379da55eff8d3ea7ec5253a234094ca7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e75ae670c8037c90520b121e8e0fd3d6363f7330..d84fd6042aae2f9d55589e452640d1c1470a8750 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6ea62ac94a8317d227f1a4d955e36033eed6ace2..56f42571f54d6473bfb7633286d7a2b7e82952db 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 24422df6d7025e7f5afd2f36d5402f9f464f5742..9ecbc401fcfc2a57c5af7d73d7dbcbfef42bd7a6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b6778495614d50cd5a77dbec1e1cba503a5a1b2e..f8aba94bb8c46c3581423a9ca84691a0fe8f7d13 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c3dfc4963ee4cfe893d1df54e33bb2b7d8e5f56b..4bed1a0893aef191434df74d1860a88deef8e3fb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7547c82c69690eda8de608238b4a6e920f9ba4f5..0600965309834527964843bedd596821ae93d40a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
 #include "ao-editaltos.h"
 
 struct ao_sym ao_symbols[] = {
-       {
+       [AO_ROMCONFIG_VERSION_INDEX] = {
                .name = "ao_romconfig_version",
                .required = 1
        },
-       {
+       [AO_ROMCONFIG_CHECK_INDEX] = {
                .name = "ao_romconfig_check",
                .required = 1
        },
-       {
+       [AO_SERIAL_NUMBER_INDEX] = {
                .name = "ao_serial_number",
                .required = 1
        },
-       {
+       [AO_RADIO_CAL_INDEX] = {
                .name = "ao_radio_cal",
                .required = 0
        },
-       {
+       [AO_USB_DESCRIPTORS_INDEX] = {
                .name = "ao_usb_descriptors",
                .required = 0
        },
@@ -57,13 +58,6 @@ rewrite(struct ao_hex_image *load, unsigned address, uint8_t *data, int length)
        if (address < load->address || load->address + load->length < address + length)
                return false;
 
-       printf("rewrite %04x:", address);
-       for (i = 0; i < length; i++)
-               printf (" %02x", load->data[address - load->address + i]);
-       printf(" ->");
-       for (i = 0; i < length; i++)
-               printf (" %02x", data[i]);
-       printf("\n");
        memcpy(load->data + address - load->address, data, length);
        return true;
 }
@@ -165,3 +159,81 @@ ao_editaltos(struct ao_hex_image *image,
        }
        return true;
 }
+
+static uint16_t
+read_le16(uint8_t *src)
+{
+       return (uint16_t) src[0] | ((uint16_t) src[1] << 8);
+}
+
+bool
+ao_heximage_usb_id(struct ao_hex_image *image, struct ao_usb_id *id)
+{
+       uint32_t        usb_descriptors;
+
+       if (!AO_USB_DESCRIPTORS)
+               return false;
+       usb_descriptors = AO_USB_DESCRIPTORS - image->address;
+
+       while (image->data[usb_descriptors] != 0 && usb_descriptors < image->length) {
+               if (image->data[usb_descriptors+1] == AO_USB_DESC_DEVICE) {
+                       break;
+               }
+               usb_descriptors += image->data[usb_descriptors];
+       }
+
+       /*
+        * check to make sure there's at least 0x12 (size of a USB
+        * device descriptor) available
+        */
+       if (usb_descriptors >= image->length || image->data[usb_descriptors] != 0x12)
+               return false;
+
+       id->vid = read_le16(image->data + usb_descriptors + 8);
+       id->pid = read_le16(image->data + usb_descriptors + 10);
+
+       return true;
+}
+
+uint16_t *
+ao_heximage_usb_product(struct ao_hex_image *image)
+{
+       uint32_t        usb_descriptors;
+       int             string_num;
+       uint16_t        *product;
+       uint8_t         product_len;
+
+       if (!AO_USB_DESCRIPTORS)
+               return NULL;
+       usb_descriptors = AO_USB_DESCRIPTORS - image->address;
+
+       string_num = 0;
+       while (image->data[usb_descriptors] != 0 && usb_descriptors < image->length) {
+               if (image->data[usb_descriptors+1] == AO_USB_DESC_STRING) {
+                       ++string_num;
+                       if (string_num == 3)
+                               break;
+               }
+               usb_descriptors += image->data[usb_descriptors];
+       }
+
+       /*
+        * check to make sure there's at least 0x12 (size of a USB
+        * device descriptor) available
+        */
+       if (usb_descriptors >= image->length || image->data[usb_descriptors] == 0)
+               return NULL;
+
+       product_len = image->data[usb_descriptors] - 2;
+
+       if (usb_descriptors < product_len + 2)
+               return NULL;
+
+       product = malloc (product_len + 2);
+       if (!product)
+               return NULL;
+
+       memcpy(product, image->data + usb_descriptors + 2, product_len);
+       product[product_len/2] = 0;
+       return product;
+}
index 7453043540a25ee66ac538f5d0e056e55bd79ebb..6f2829b093ed7c4ae5bd84a29ab0b780736a43e3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
 extern struct ao_sym ao_symbols[];
 extern int ao_num_symbols;
 
+#define AO_USB_DESC_DEVICE             1
 #define AO_USB_DESC_STRING             3
 
-#define AO_ROMCONFIG_VERSION   (ao_symbols[0].addr)
-#define AO_ROMCONFIG_CHECK     (ao_symbols[1].addr)
-#define AO_SERIAL_NUMBER       (ao_symbols[2].addr)
-#define AO_RADIO_CAL           (ao_symbols[3].addr)
-#define AO_USB_DESCRIPTORS     (ao_symbols[4].addr)
+#define AO_ROMCONFIG_VERSION_INDEX     0
+#define AO_ROMCONFIG_CHECK_INDEX       1
+#define AO_SERIAL_NUMBER_INDEX         2
+#define AO_RADIO_CAL_INDEX             3
+#define AO_USB_DESCRIPTORS_INDEX       4
+
+#define AO_ROMCONFIG_VERSION   (ao_symbols[AO_ROMCONFIG_VERSION_INDEX].addr)
+#define AO_ROMCONFIG_CHECK     (ao_symbols[AO_ROMCONFIG_CHECK_INDEX].addr)
+#define AO_SERIAL_NUMBER       (ao_symbols[AO_SERIAL_NUMBER_INDEX].addr)
+#define AO_RADIO_CAL           (ao_symbols[AO_RADIO_CAL_INDEX].addr)
+#define AO_USB_DESCRIPTORS     (ao_symbols[AO_USB_DESCRIPTORS_INDEX].addr)
 
 struct ao_editaltos_funcs {
        uint16_t        (*get_uint16)(void *closure, uint32_t addr);
        uint32_t        (*get_uint32)(void *closure, uint32_t addr);
 };
 
+struct ao_usb_id {
+       uint16_t        vid;
+       uint16_t        pid;
+};
+
 bool
 ao_editaltos_find_symbols(struct ao_sym *file_symbols, int num_file_symbols,
                          struct ao_sym *symbols, int num_symbols);
@@ -47,4 +60,10 @@ ao_editaltos(struct ao_hex_image *image,
             uint16_t serial,
             uint32_t radio_cal);
 
+bool
+ao_heximage_usb_id(struct ao_hex_image *image, struct ao_usb_id *id);
+
+uint16_t *
+ao_heximage_usb_product(struct ao_hex_image *image);
+
 #endif /* _AO_EDITALTOS_H_ */
index 680a80f06098993dc4b5a273b230265cdb51395f..c44102f869a7fe2d6964b601ebea23f9e529a7f5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0f79d1425cad04226244ee3968d70ab69ea2812a..5f4e8428a16505eedc34c1199249137e79ac3f03 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a1ab490ceab707c30630241f91fa04cea6b69225..3cd0813b7fdacffd1a0262c3126192acb1a41a5c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 41e45adc4f8f21009a5f1bed4264993955776fd5..0a23dfda0ae9eccc1be55b24a90dd8b0ecef7aa7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -156,3 +157,40 @@ ao_self_get_uint32(struct cc_usb *cc, uint32_t addr)
        free(hex);
        return v;
 }
+
+bool
+ao_self_get_usb_id(struct cc_usb *cc, struct ao_usb_id *id)
+{
+       struct ao_hex_image     *hex;
+       bool                    ret;
+
+       if (!AO_USB_DESCRIPTORS)
+               return false;
+
+       hex = ao_self_read(cc, AO_USB_DESCRIPTORS, 512);
+       if (!hex)
+               return false;
+
+       ret = ao_heximage_usb_id(hex, id);
+       free(hex);
+       return ret;
+}
+
+uint16_t *
+ao_self_get_usb_product(struct cc_usb *cc)
+{
+       struct ao_hex_image     *hex;
+       uint16_t                *ret;
+
+       if (!AO_USB_DESCRIPTORS)
+               return NULL;
+
+       hex = ao_self_read(cc, AO_USB_DESCRIPTORS, 512);
+       if (!hex)
+               return NULL;
+
+       ret = ao_heximage_usb_product(hex);
+       free(hex);
+       return ret;
+}
+
index a001a4043e3b4c448deb259ceb5b51fb8544e071..4aac5848da1bb31ae4c461cb1f352685b6fce944 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,6 +22,7 @@
 #include <stdbool.h>
 #include "ao-hex.h"
 #include "cc-usb.h"
+#include "ao-editaltos.h"
 
 struct ao_hex_image *
 ao_self_read(struct cc_usb *cc, uint32_t address, uint32_t length);
@@ -34,4 +36,13 @@ ao_self_get_uint16(struct cc_usb *cc, uint32_t addr);
 uint32_t
 ao_self_get_uint32(struct cc_usb *cc, uint32_t addr);
 
+bool
+ao_self_get_usb_id(struct cc_usb *cc, struct ao_usb_id *id);
+
+uint16_t *
+ao_self_get_usb_product(struct cc_usb *cc);
+
+uint16_t *
+ao_self_get_usb_product(struct cc_usb *cc);
+
 #endif /* _AO_SELFLOAD_H_ */
index a1678ed139003e33f2532467dea18dfd1dbf0741..d85b524f7f49f2f53b4d58644b97fe34c069c69a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 26c2fe41974ce8e7121518ad8756228238bafd04..d23e720cc8de1e73479579556f4afa1e696c73f8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 27c416a6387056d01a81c16bf11523ce8a91fbea..52df66e666019e02c745db16e94e658180d7c339 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b82dd778bc3969140f2270b104fa07ae3a0663ce..0f7fa809ecd77864be20d5b866529f7c1c082308 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 518c1a68f70d055ff2fe4e54cd39d434ed9c9416..d44c696da7435ff7641ecfb0f23ecd8826e6537e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ba50761b257a4dc68333135af313f3c39860c9c8..8009f0c3cda816dd20896dfe4a2c947b93088859 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ed51f87e2ef1c2001932bb94eafedc2282b15c94..f76743599a5ae7ce530545de58a3a1578078ba21 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 842e5c7c3cdb1b791dda54de28a9764ae8071a34..88ddda58822ee487da4a7b07a6620bc3b914bb9c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3aa24a6d39761c2bdd712b761e002ad36cb05a29..2e5a6061990f7c5c3f0996b1c69bc8547c229fa2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 844ac79e9fd35c9333a3053a177b8531719e1116..fb1c3ccd0565dcd66ae7d227c58730816035676a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c756b57028a5dd3a9a8f787867b4ec2eee53b354..74b02a74b53af644707d816aca2c40c453456b37 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index aa52b7c5b14ce863b4c663679072107fc8c0a0a2..678c078eb3183b7067b2406fd2ce23907483aa8d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 45c10dcb01d636731115927273c6752af6be7a64..42315128c13745986461665ff6d31fea8714a34b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d64c4b30d3d0395cc6ce593d675dfc1ed0fa20b3..500de96c30391d79f703b8ed81f3b5fa7946fbd7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 65488ee9b7f6e36a9c8918be3c56ee3fbc3972d6..fc617eae22c883565ae987cd9acf4777997a258c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ff95e4fc9ad171e30d9e5b179960c65843dbef3b..cbeb705c895e4f6135aa6dea4980f4d7fb165a35 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f8ec264f09ee556e75f6ee9fb43de83488155737..7d66425b93932df8caaa69805d5d580655a52019 100644 (file)
@@ -10,7 +10,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6f7b5a579ff5eb29b27e3e305b6f4b5dd6f7e346..2156d1c1cf27fadcfe68f015644084e146a45747 100644 (file)
@@ -10,7 +10,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index af1ebb511debcd9ef8eda89c566869f2f7404a62..9898a2e1ed428aa6f4abcf4afd98154a29e12c93 100644 (file)
@@ -10,7 +10,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ea7c984c1b17cf3d24e8fa706f34b4a198122784..8c2c96bdf7ac1b9f95e4b091903a7c4daf1addbf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e80a0f8b13d20dee8811bb17cfd0cc9c3e178550..a400163c430a00c37997b7430f27b8c3f8a09229 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 001449a75e6c7dd5ef6d552aca3b0ab216ac40b4..0fc946f21831ee0ba525b9ea7de810a6b39b28f6 100644 (file)
@@ -18,7 +18,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([altos], 1.6.5)
+AC_INIT([altos], 1.6.8)
 ANDROID_VERSION=13
 AC_CONFIG_SRCDIR([src/kernel/ao.h])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
index 707a4428ad527c578dd66d956b7c457cb44f30d0..e6fb95abc5c8deed5459df5916c8f5a05fc8eaa8 100644 (file)
@@ -3,6 +3,7 @@
 #
 
 RELNOTES_INC=\
+       release-notes-1.6.8.inc \
        release-notes-1.6.5.inc \
        release-notes-1.6.4.inc \
        release-notes-1.6.3.inc \
index fbd14c5a5a22cea0ff62740206a92c54971973c6..e1f4eb62b86148d59c4fc7b3ce24c9e7715e95af 100644 (file)
 </legalnotice>
 <revhistory>
   <?dbhtml filename="altusmetrum-revhistory.html"?>
+  <revision>
+    <revnumber>1.6.8</revnumber>
+    <date>4 Sep 2016</date>
+    <revremark>
+      Minor release fixing another TeleMega and TeleMetrum v2.0 bug
+      which could result in loss of data logging and telemetry in
+      flight. Also fixed an AltosUI bug which would hide some pad
+      status values and never show them again.
+    </revremark>
+  </revision>
   <revision>
     <revnumber>1.6.5</revnumber>
     <date>8 Jul 2016</date>
diff --git a/doc/release-notes-1.6.8.inc b/doc/release-notes-1.6.8.inc
new file mode 100644 (file)
index 0000000..8e37fe6
--- /dev/null
@@ -0,0 +1,40 @@
+= Release Notes for Version 1.6.8
+:toc!:
+:doctype: article
+
+       Version 1.6.8 fixes a TeleMega and TeleMetrum v2.0 bug where
+       the device could stop logging data and transmitting
+       telemetry in flight. All TeleMega v1.0, v2.0 and TeleMetrum
+       v2.0 users should update their flight firmware.
+
+       == AltOS
+
+       AltOS fixes:
+
+       * Fix STM32L DMA driver to work around STM32L SoC DMA priority
+          issue t lock-up in the logging or radio code, either of
+          which could stop data logging and telemetry.
+
+       * Avoid having TeleBT battery status values smash telemetry
+          packet data by holding a lock during both operations.
+
+       * Don't start reporting 'flight 0' when the log fills in
+         flight.
+
+       AltOS changes:
+       
+       * Flash LEDS on all products briefly during power up so that
+          they can be tested during production.
+
+       == AltosUI, TeleGPS and AltosDroid Applications
+
+       AltosUI fixes:
+
+       * Re-enable go/no-go entries after they've been disabled due
+          to lack of data. If telemetry information is delayed when
+          the Ui starts up, sometimes important fields would get
+          disabled to never re-appear.
+
+       * Deal with ground station failure better during Configure
+          Ground Station operation by cleaning up pending operations.
+
index b8b34e7bcf711bb713348ea2bd9f8bf347ab54b4..7cd075f624a2e629988825175c28a16db90893c3 100644 (file)
@@ -1,6 +1,10 @@
 [appendix]
 == Release Notes
 
+       :leveloffset: 2
+       include::release-notes-1.6.8.raw[]
+
+       <<<<
        :leveloffset: 2
        include::release-notes-1.6.5.raw[]
 
index e075a02d9dff4f91b41f2b0a2aac00da7c685c20..8db2be3d157be8e9c0879cc757bb03b47d5d12e3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6d43159be529b6fea0d838d23262dd9cc5584b3b..8c49346fdf3a7e45f19934c2bea1355f6b0a7bc0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 090f03adbbff3cc3c07b42508bfc0cc2044384fc..dfafcc7a790fa9d325fe70103caea3ff235b9d22 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 04194d9ac5809392e228ac3681c143867ffaffda..c6b6355f870fb9e1cf33fbedb96dc93ea65fe6f0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2065d74af7648e883b23a596808c983043917d5a..1cade72d6e25ce4763dfeb601f714b3d901eec50 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 731e9aa14ce3b45913769457dbc991b8016c8e76..bf5d46998b19f10dbf321fae72458f13e38df07a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dc9bfb62c37eaf320585571f5c3566728d4eb9b4..bf8b71b6d2e5c02b820034c281815fd84cb0901f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 56f6335b18fa6ef05d8ebcb859e25a492e077421..f8e5231bf26b488d901b617e385d168d8f77607a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2c3f41e11826cb199a5de41c466976235fab8ed9..e53aa72bf87400583cd6819cf9b6cea415c8d5f8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e763be27a8bdc6e10250b9abcdb1785b56c635ca..b45ad2c18d9c6215896b185739bb97e71a32e55b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fd6b4a8bd2029b00ec17726085fd57a6540ff1ea..420792911ac7eab2e21cba765841f8a306b6528a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8b2c747f674b53aed96603980b425421aeef5e48..010612a0f37c34b21339128919d3b5948040ad25 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9e0299b083625fd9830324511851ffc03c7c3cf9..2326ea089f3d930bcf88c7c45e73c6f94586dda9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 406f7286386943ac98d8ad0e6845d1e33a4fe84e..f106268131654f3f13c894b0f8b48b133555f042 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 00c59931ca635d84313ff2751ec0b5af3951b73c..b341f350392e76622c55694c1985b362b2435f8f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 394b431727367da547b1971c32612b0e6ad4ffd2..c068244bd835973fee7dd5e7c0ce33dc6ede167c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 618c839e80fdd75ee16a1d5bbbde6836773aaadc..b6f1f76d7d74052a1fb7ac3d1f66b25352c15761 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bc9fb0dcbee1e08ba3887ccf3b47ba403254ee91..64a43bd8fcb88ae1d6b204776b58cfbcdf9cfeec 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c624246f6bbc72b53561dc31083bc8ae7d1f16ce..9023f452df7f4d4578beda8b13b857c1351723e2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8857958fc754709ab53e6231f42fb42d1af91ede..f00d7ea38462dc876080d9ddd5dc82e97097867f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6822a96114afea8cf5ab8bf325b5200fba6a56d0..5dda5b8c53dafdcdac34a87f6c621cc25362f72d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 93c40d712a34650115689b0219690105163d8080..43dfd18bd35f4cd1c898e96bf3e0d353aa23aca1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 55d759e5f5eff652b574a9abb940b58bd31d307e..2e6dd23671656ad3d7a4b2d1cb90c372d67cbd45 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 754804450228eabd0efcc9888b23379603ef3b9b..b9637536c0a3ca87212ee0d6262ce4ce9cbc088f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7ffae2f280b3b408756d1d806454534eea047036..e095e3a4d5ddd3352ad8f62b741b39314ddecdbd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4a72ba581a1bb5ca0447a96b2c6e9e829bbbc1a7..4ab5fcc96b33e0d01396d42ee1d6e87c24ac445c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ecba2fbd7740e5b67f8935b4ec4b38d183c4ef64..5bc0a7a04ac714710ae0ac0f603f8e3e6365ff85 100644 (file)
@@ -19,7 +19,7 @@ include Makedefs
 SDCCDIRS=\
        telemetrum-v1.2 telemetrum-v1.1 telemetrum-v1.0 \
        teledongle-v0.2 \
-       telemini-v1.0 telemini-v2.0 \
+       telemini-v1.0 \
        telebt-v1.0 \
        teleterra-v0.2 teleshield-v0.1 \
        telefire-v0.1 telefire-v0.2 \
@@ -31,6 +31,7 @@ ARMM3DIRS=\
        telemega-v1.0 telemega-v1.0/flash-loader \
        telemega-v2.0 telemega-v2.0/flash-loader \
        telemetrum-v2.0 telemetrum-v2.0/flash-loader \
+       telemetrum-v3.0 telemetrum-v3.0/flash-loader \
        megadongle-v0.1 megadongle-v0.1/flash-loader \
        telegps-v0.3 telegps-v0.3/flash-loader \
        telegps-v1.0 telegps-v1.0/flash-loader \
index 6ca12af65836904ccbc9a05c1937e1347c054715..3a34f417c9cf844099b37ef7a4d528e03f233042 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d4584a9fc1eeeb2dd028948ce3d78e427acd57ee..0b67a407afecd7da2a261d3f602b406e645a5983 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f64f7bde41e626218669f7cae25d8789c5812f41..f7a29d3b799f88e0ab71dd2e92f4db3f167d4e30 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b239712855e3276da9b2b8d75c213f94bf9e5d3..e3ce97f33f909820555061cd93cc7d612c5386a4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 22de8e99352d5041b09bd50af63376e2329ff563..d722d568d75da0e23e759b26231d3c185822bde9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8301418392f9c0ad59bb873ae6bbb6518313b8e2..be3c965aa5a5197a51ef301a058d0db8aa6994df 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0ca10ca4385b54976387f2d80e795a9193488c01..8ae1c4a09542baad4e5fd7a77938d62ca95445bd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 85bb2fbabc939eb39b3ad0e31205f287668a6dff..8b22458e2ccd672c04475020a1b686ef3968ad04 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2ee44fd2eea07d180224d077172b220ff8096784..f29ed6a9c7e33c727f0ce5e196ee3b21d7ac502c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 27bbea6913f2226288c0c3adfd1b01789a94cea4..5f53129e1b4b92139f31dd3cfae4fe545a3553cc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3c4afb0277b79dcf3234eb4cc2a1f32eb6dfd997..f63eb651286cbafb6b7f6d7694ee5d7d9bcbe9f3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e35babb3decc243a5ecb67640596e9837b91eac0..ff909b375a8ad56b98ea2fa21a43183e21966503 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 231512b2136e4993e54d9daa5a5c8f0109bfd250..2732c4dbe9635bd38b55fd12154ecd27d21b9a46 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f8c7f042a1954ebc7287adacc531fe9be7b0ab74..2b1da642ad5de023bcaf0cdff19c9f4b6fc88c4e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 792ff7440bf724d5e824abf351cd391891a52a0a..891ad9b18c374e9b615ac549bdf32a8aaf668e7e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f9c0f88c7e33474f666e4bd04984d3368371bce2..cca2a9718313170b1b823a51c22a37216b5fd06c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0d42b6d5cee511baf2160e18085815b9a37bb2c9..54a9163b8a34ab73a26fb020fb973e3fca7c877d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2e41e15a6bee9c34972d38f06b427e76a7bc9491..3821779e0c0c10c9dbbae89a4b2740542bc447cf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2451fa8af1f212abd67e8b25c726ffe091f7894d..2fdf177b6350451f72e0d1175217018c22995daa 100644 (file)
@@ -4,7 +4,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 60e35f8c770750e8e76ec36c79b8256af6926b19..c95548d4a9853aecea9a94ee286c5da5e82e4193 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b1e8aa17652f7c5219ed79aac64304a56741908f..87756e415322817fd61774594107246da7736e9c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 91dfb85ea910c7308aa4d8dca5c13bac1a39f5c9..8eba48981bc75c7d64dbc69793b1a9a4486c5f3a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a08e87fa021660ed21c04050c1690e37e4ad1ea1..9686c418ee4c304ca80b39594ec7d17665ec4eac 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 84397357a7ee89ee4967b3300f0e2b49950cb62f..5eb392a4d950df287b35b2ce8d41a3d6aecdd72d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8097d399bb6c099580f98741dd1e3366a868462b..43c12f5396341079221c5eb2d2d3cb47e1b552a8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ecc19c76d44c42b16952cc26930c27561d7bc190..4acfc1c8ee48475eda7b702e73b87d15065836e7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e0f813d5acd33fdeb62049a5c8a1814599948bbf..ab82b7b1d67bdcb8708dc188bd08d24078fecd71 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 15e9924da5d6f20c4b1b454a3393d3fea9d23c31..3504739d683d35b9c2e4334917f22be875b61d34 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7c41042a4424026e99b0ea821c618a7b750298fe..0d509cb77660dc23bd5894d6c88b8df1ffa0c1d5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d2ea2be7da5ce142ceb46ad0d3ebaa40c1689add..2eaa8b63fc65a4a4472802721d3936438c62bcb4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cb0455c2d1ac6886bad4846c8d0184ed2efeaf00..08950a97b0d4bb147acd2195cf73b4eb7a1bc7c1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1689ebef3b1b831b3b653bf5349c234e2cf1104d..94af5cda433ba710c16d13beafc2e884cf5d66e6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b1f305eca2ddee9279dff315c3ea1f4b2ee3d256..e845a928ad0deac3de2b7bf39d326ae0628f6ee0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6eb1a11101c6f473d09b950b60ae0d8ee386ff28..bacfabb87f53852ba1f63b1803e15f178f76f120 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1eb506cdcb1d02000e238609284e091dc4dc05c9..d849655bb13c9dd910f05e9a12026c4c58f68624 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b9845fb38612cde07a071bb6e6e9ac1d8e46734f..9fb4c26b538e65db1fee2e380d79d842a6fda510 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3642f4c6600468371ce580b402e3ed00432e8697..04d1048570975920e9e82907018d1ff0c5698998 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a0f221c2780ce0c6df18935f2996aaab8200159c..0496a32f270454b95935017896c318eec98482bc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4e534697021d71eab0266c0e977ac5c207ea4cf1..ca751b88122a567cb06569b0f9bd7c14f393566f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8779ddf414dfd188fe5777bb23070e3fc32b2c4e..1826651897cc6466d152d3a867cdd21aec13c2fd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 537f62521baf7a8c703a99c111c7cb72271c644b..e21e417c2ffe8fce94d08c238187aac2ca436ab1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 49fca5d23df5310a3ded9469bc134ce97493411f..927a4f098a04e22661f420f9278b1d14ec9bd0b9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index eb3535c6933f4b42797a6ee0a5932858159a80ec..154b3c252c1db4549869d4efd7b9ecd815c4375d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 420f75683666c41125a19e259f11d491c6f7d284..4f0a0c1400252b48fbf7f980f11e96194e0cb234 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e61b1a60490a7600a931d6fad6d43fb5d6e2f457..9b5880903589225998016b05e208f9990e5b9216 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5beed58de133bc5aafd341fe5426414b49bca2e6..5fae46c26e8fd471a607a9d39e225fc049494188 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9cbb0a7b51aed07894959821dd9d68b27fff16af..10b1f802c645d3c0790b0e10b4c5a83d3f87b736 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cead036419f18c97a9ae7277564a849242d5866e..166d14d5e9e67cd5e4b92828714bb0bc64af0342 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -587,13 +588,13 @@ ao_radio_rdf_abort(void)
 
 /* Output carrier */
 
-static __xdata ao_radio_test_on;
+static __xdata radio_test_on;
 
 void
 ao_radio_test(uint8_t on)
 {
        if (on) {
-               if (!ao_radio_test_on) {
+               if (!radio_test_on) {
 #if HAS_MONITOR
                        ao_monitor_disable();
 #endif
@@ -605,13 +606,13 @@ ao_radio_test(uint8_t on)
 #endif
                        ao_radio_get(0xff);
                        RFST = RFST_STX;
-                       ao_radio_test_on = 1;
+                       radio_test_on = 1;
                }
        } else  {
-               if (ao_radio_test_on) {
+               if (radio_test_on) {
                        ao_radio_idle();
                        ao_radio_put();
-                       ao_radio_test_on = 0;
+                       radio_test_on = 0;
 #if HAS_MONITOR
                        ao_monitor_enable();
 #endif
index 8c47b89351cf7ed5ce5963510dcf4227f7135606..6e1de7a3a47f3bc1bdac8162dc105c0fe0632aa9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f3fe61b1921e50e0437d06cd5dcffac46fdc1edb..abd51b23f0513cf3079159a3f56df482318001e3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b4f57908a4bd984da45fdcedfc596c72e3687623..70293b4e4247bed35abb806d1ac1da6512fd8ddb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fb08f3f5311332226901aaf71a6f2801813e22a4..124e09cb7f95479cff34472ebe555ebab452fab8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 85d6383e878c321b1aeb598b44eab63fb318a54d..dd62ca3d4ab43cdae87be4689ac44a0b1e58cf7f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2fbc6621dfdf43c9b989f5d1cbad0092b8498a9f..0acef562608f7760104ae230e837b7aa90856eb5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d9d255f8334838cc9c5c7eb6632624536a77fb34..7d363c08fe92ef86cdff5eec64745c43bbbf104f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ac1e71c971028fc33ac3a822b4660b6c45088ba7..7d7c3a209669447422cd1336da3b49d14ab78524 100644 (file)
@@ -5,7 +5,8 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
+   the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
index 48c8bf04b59ffb62193846c28047cc178d9b4d52..689284168ad7da9cf7fcaa62ea7f2ed952c497bf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 73f763071df5ae1c04059bf89372211159155401..cb8f33934eff4d49c225b51cdc879cd4adae0709 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 295e0258b63f47bff3cfca395846afb015bf0aa3..a2370e1775859f6b2803384a9caa9528799997dd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f887e601608ad0b2041fae98a6016681ac9b77b2..c3acd441c637c77f2357f01a24d11e74dc434020 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 89a2cb08eb22543f9ffed7c6bc27bded3f1482ad..f2c46d8b409193a84156975326f25011f8c98869 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 570800ca7049312fe1765c1f2ed6fba59731f4c8..4b788f67a476562b6eda928313dcc96650f7ac0d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fba9195e7aaf135732c7a0ba4c3a5e0d978968e8..0f7f4c85fac17caa4baced945953d65867844b13 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1c577b6ee6b47083436d8f51478575c3afc7ae01..a8f9f2a45775aa5b90581ca05db3e91a29230b7a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 570800ca7049312fe1765c1f2ed6fba59731f4c8..4b788f67a476562b6eda928313dcc96650f7ac0d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fac0a430f1b97406fefa92d31a4936c5b2fd2aa9..a9c897b3154f8d26f97e5bfec2deee746d637306 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 44e52387c0dd81d5cf054d175fa631df07f38580..7e48f0ddbacdbb2c2a57c9a1507d2c71b63f6657 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 143f4e3f91294367ae14835d7e54c2dc3bb1ef5a..8842801d122c2b862808c9c98a168d15195c4b48 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3ae51353f72320dc8790e7ca38e167e13660e848..febbf1b343853f37f1d4779e850c50d9dc9c5c37 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4c13ee71e1a534c86cfe6ccf99ca0d273143799f..b3fd3c912c855f8fa62e9c31edd8ac89bcabf15e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6df7bcae8fc8dc9de362f3cc1766fc1519187040..bb14f20a36afeda9386d3b1e385c782c66131c06 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a033fa0b991b49edbf5ea264835d8d02199e8441..8f70d2d0b7b2fbbea88ea8a23acc3c59ac39a35e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2a23be3a2cd6d841835e58ce76adaa4d6de8fdfd..8f91e3ca9533f600bf8eb1e9b748b279595dba62 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e7e74153db6c46298eba0556e088380d24351f8f..abba3f1fe64170e83cd0b82c1a70d77c82506c09 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9ee6f1b645a50057c7f6ca029e01d3e365c38c61..db52f0f445c28b2c4a7e078f12a2291e6ae631cd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e7052cb413000059c259587282121b0c60d4474..c65a8548b0c9cccf927cffa287f4e8d22876f742 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 70e30b67fee98897f22dd473b114b72063d991dc..f212da53b36088491f6c91bf1f5d8287d57f9bd6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6629f1431fa03ddf89ecdc7bc2c080a4e93e800f..b0a119445ee30224d7ccfb4442e9d6e0383f1583 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e7dead71df6d075014a233c0d43c77f973a59a9..725ac45a762334a6bdbf5a303d1bb028200081e6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -92,6 +93,12 @@ _ao_button_init(uint8_t b)
 
 }
 
+uint8_t
+ao_button_get(uint8_t b)
+{
+       return ao_button_state[b].value;
+}
+
 static void
 ao_button_isr(void)
 {
index ce349d651647feea57c025025b1e63109792971d..601472f93411dc516055134541a670c3d22de775 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +19,9 @@
 #ifndef _AO_BUTTON_H_
 #define _AO_BUTTON_H_
 
+uint8_t
+ao_button_get(uint8_t b);
+
 void
 ao_button_init(void);
 
index 6b8005852c9bea9ca49ba02b994b0a5717066cf9..efe5f996acaaaa157d42397ad9f2bf313554368e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -182,9 +183,8 @@ ao_radio_fifo_write_start(void)
        return status;
 }
 
-static inline uint8_t ao_radio_fifo_write_stop(uint8_t status) {
+static inline void ao_radio_fifo_write_stop(void) {
        ao_radio_deselect();
-       return status;
 }
 
 static uint8_t
@@ -192,7 +192,8 @@ ao_radio_fifo_write(uint8_t *data, uint8_t len)
 {
        uint8_t status = ao_radio_fifo_write_start();
        ao_radio_spi_send(data, len);
-       return ao_radio_fifo_write_stop(status);
+       ao_radio_fifo_write_stop();
+       return status;
 }
 
 static uint8_t
@@ -200,7 +201,8 @@ ao_radio_fifo_write_fixed(uint8_t data, uint8_t len)
 {
        uint8_t status = ao_radio_fifo_write_start();
        ao_radio_spi_send_fixed(data, len);
-       return ao_radio_fifo_write_stop(status);
+       ao_radio_fifo_write_stop();
+       return status;
 }
 
 static uint8_t
@@ -773,11 +775,10 @@ void
 ao_radio_continuity(uint8_t c)
 {
        uint8_t i;
-       uint8_t status;
 
        ao_rdf_start(AO_RADIO_CONT_TOTAL_LEN);
 
-       status = ao_radio_fifo_write_start();
+       (void) ao_radio_fifo_write_start();
        for (i = 0; i < 3; i++) {
                ao_radio_spi_send_fixed(0x00, AO_RADIO_CONT_PAUSE_LEN);
                if (i < c)
@@ -786,8 +787,7 @@ ao_radio_continuity(uint8_t c)
                        ao_radio_spi_send_fixed(0x00, AO_RADIO_CONT_TONE_LEN);
        }
        ao_radio_spi_send_fixed(0x00, AO_RADIO_CONT_PAUSE_LEN);
-       status = ao_radio_fifo_write_stop(status);
-       (void) status;
+       ao_radio_fifo_write_stop();
        ao_rdf_run();
 }
 
@@ -998,6 +998,8 @@ ao_radio_rx_isr(void)
 {
        uint8_t d;
 
+       if (ao_radio_abort)
+               return;
        if (rx_task_id) {
                if (ao_radio_try_select(rx_task_id)) {
                        ++rx_fast_start;
index 943f344958fcf9337dc1daa6033d48c3733e55d4..87b083d4f61aef6d60afa4b13efbe47a6e759265 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 24180f345cc6905856ad097884f83e386c113bef..a67071d24d879c44e348bb8ecb5ff8831e624e9c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 811c14aad0573f139b76478a70e3a983f25faa1e..c40f53586f545106dfdd65562dc6a85a52e09e96 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cd85f208aa3dd8f6c6a03d7a57cc65ac57d608c9..2bc997348b8b47375f258842a96a3067f9e2aff6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -802,18 +803,12 @@ ao_radio_rdf_abort(void)
        ao_wakeup(&ao_radio_wake);
 }
 
-static void
-ao_radio_test_cmd(void)
+static uint8_t radio_on;
+
+void
+ao_radio_test_on(void)
 {
-       uint8_t mode = 2;
-       static uint8_t radio_on;
-       ao_cmd_white();
-       if (ao_cmd_lex_c != '\n') {
-               ao_cmd_decimal();
-               mode = (uint8_t) ao_cmd_lex_u32;
-       }
-       mode++;
-       if ((mode & 2) && !radio_on) {
+       if (!radio_on) {
 #if HAS_MONITOR
                ao_monitor_disable();
 #endif
@@ -836,12 +831,12 @@ ao_radio_test_cmd(void)
 #endif
                radio_on = 1;
        }
-       if (mode == 3) {
-               printf ("Hit a character to stop..."); flush();
-               getchar();
-               putchar('\n');
-       }
-       if ((mode & 1) && radio_on) {
+}
+
+void
+ao_radio_test_off(void)
+{
+       if (radio_on) {
                ao_radio_idle();
                ao_radio_put();
                radio_on = 0;
@@ -854,6 +849,27 @@ ao_radio_test_cmd(void)
        }
 }
 
+static void
+ao_radio_test_cmd(void)
+{
+       uint8_t mode = 2;
+       ao_cmd_white();
+       if (ao_cmd_lex_c != '\n') {
+               ao_cmd_decimal();
+               mode = (uint8_t) ao_cmd_lex_u32;
+       }
+       mode++;
+       if ((mode & 2))
+               ao_radio_test_on();
+       if (mode == 3) {
+               printf ("Hit a character to stop..."); flush();
+               getchar();
+               putchar('\n');
+       }
+       if ((mode & 1))
+               ao_radio_test_off();
+}
+
 void
 ao_radio_send(const void *d, uint8_t size)
 {
index b2b63cde490a1b5c294e64111ed7c2bf39aeee88..8e17bbd9fb0837b31ac7310ead20c201c0ddecd3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5f07e8b06cf8827e71e031b215c30a1aedbbc97d..f82558a3343e6e3890bf71d49a45a11fa84ae5cd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8f88d77866c391cc91645de7633ab28fe1390779..9856c2aaf8f47ea62f21fdcd91da982d570ef609 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ea89da23c07cef3598c4159c5792fae4d376cbda..d1c69d81b2761d86106200af90c63f7f31ca6b12 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cbcd42bc12a5c8a1aafa308072e896bdea12de8f..fb8eecff177322cf9b46a959f87fee4bbe9fbf89 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 01435363bf0009a28f74f26750f09a84888200e4..39f4207bb1dc6e418a02769918b4c1c06bf75c2d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d89435b9c635f46891ae62ca948a5378e4a7238a..8bebd61012a123b8c1ec017966770868877a2636 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 066df6fff628a39b0680b69e8cf1d34a27b1fe84..c483382e03539405814b6178d04bfa29848cf655 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 74c29e0a0e74e20af16436e66ffd2de3ab4d12b5..22af413a0098008f2ed7dd1e1fa44834ef0c54f9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e4a358a87a23d50852d459f0d52862ce2c3d5318..1d9bcee89897e472c75a0245ecdcdc9c5c6cdb60 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f761671a1d3e0dac1cbbe90be7a0408e6ae928d0..f668fb66e7435f720a08d20cb8d87291326ebb48 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ff2725ebdaa6820a10476452576fe25569b3e19b..78637b029ead55cd988f3421d4624d0225dc974c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6def0c80518ec9ee2bd9579dcee04c97d403bea1..c35093bced0fa909c1d1b3d690a778cc61358145 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6c192537be7400167d0ebbb460406687d9590c59..00f10ecce2718e5268c211b1b26fb9a10441e5ea 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 253f9702e3904c92560385a6b1964a88632024bf..5721eed539044ab02e897526083dcd439aad533d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6a36568748b39218440d45cbf351dd9f534cc94b..dcc0c6d011c64986c7234976ce4b5be46ea4de4b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c55448cd691068d8790bc018d32dba2f52b06d0f..2975bffe6641160e7a5db14c088fd7fd73b90457 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 08d454670acb0bd881da59385e6e2ac265a3e038..862cb1be76d628745a8402da16cce6ac2e4655eb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 42754352e2b3a0b96edd5780d3d77bea094d6faf..6b06f92849cac7f92de8a4fb84fd50a6bb95af89 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f53fef7db19fd19c8b93f738b9b6878fb465dcea..1cb0546c0fc0f8e5dc207977ae82d56b6da54ba1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +19,7 @@
 #include <ao.h>
 #include <ao_lco.h>
 #include <ao_event.h>
+#include <ao_button.h>
 #include <ao_lco_func.h>
 #include <ao_radio_cmac.h>
 
@@ -36,7 +38,6 @@ static uint8_t        ao_lco_debug;
 #define AO_LCO_VALID_EVER      2
 
 static uint8_t ao_lco_suspended;
-static uint8_t ao_lco_selected;
 static uint8_t ao_lco_valid;
 static uint8_t ao_lco_channels;
 static uint16_t        ao_lco_tick_offset;
@@ -44,29 +45,34 @@ static uint16_t     ao_lco_tick_offset;
 /* UI values */
 static uint8_t ao_lco_armed;
 static uint8_t ao_lco_firing;
-
-#define ao_lco_box     (ao_config.pad_box)
+static uint8_t ao_lco_box;
 
 static struct ao_pad_query     ao_pad_query;
 
-#define MASK_SIZE(n)   (((n) + 7) >> 3)
-#define MASK_ID(n)     ((n) >> 3)
-#define MASK_SHIFT(n)  ((n) & 7)
+/* TeleFireTwo boxes have a single pad */
+#define ao_lco_pad     0
 
 static void
-ao_lco_set_armed(int pad, int armed)
+ao_lco_set_box(int box)
 {
-       uint8_t bit = (1 << pad);
+       ao_lco_box = ao_config.pad_box + box;
+       ao_lco_valid = 0;
+       ao_lco_armed = 0;
+       ao_wakeup(&ao_lco_armed);
+}
+
+static void
+ao_lco_set_armed(int armed)
+{
+       uint8_t bit = (1 << ao_lco_pad);
 
        if (armed) {
-               ao_lco_selected |= bit;
-               ao_lco_armed |= bit;
+               ao_lco_armed = bit;
        } else {
-               ao_lco_selected &= ~bit;
-               ao_lco_armed &= ~bit;
+               ao_lco_armed = 0;
        }
-       PRINTD(DEBUG_EVENT, "pad %d bit 0x%x armed %d ao_lco_selected 0x%x ao_lco_armed 0x%x\n",
-              pad, bit, armed, ao_lco_selected, ao_lco_armed);
+       PRINTD(DEBUG_EVENT, "pad %d bit 0x%x armed %d ao_lco_armed 0x%x\n",
+              ao_lco_pad, bit, armed, ao_lco_armed);
        ao_wakeup(&ao_lco_armed);
 }
 
@@ -76,7 +82,6 @@ ao_lco_suspend(void)
        if (!ao_lco_suspended) {
                PRINTD(DEBUG_EVENT, "suspend\n");
                ao_lco_suspended = 1;
-               ao_lco_selected = 0;
                ao_lco_armed = 0;
                ao_wakeup(&ao_pad_query);
        }
@@ -97,7 +102,6 @@ ao_lco_input(void)
        static struct ao_event  event;
        uint8_t timeout;
 
-       ao_config_get();
        for (;;) {
                if (ao_config.pad_idle && !ao_lco_suspended) {
                        timeout = ao_event_get_for(&event, AO_SEC_TO_TICKS(ao_config.pad_idle));
@@ -114,14 +118,12 @@ ao_lco_input(void)
                switch (event.type) {
                case AO_EVENT_BUTTON:
                        switch (event.unit) {
-                       case AO_BUTTON_ARM_0:
-                               ao_lco_set_armed(0, event.value);
+                       case AO_BUTTON_BOX:
+                               ao_lco_set_box(event.value);
                                break;
-#if AO_BUTTON_ARM_NUM > 1
-                       case AO_BUTTON_ARM_1:
-                               ao_lco_set_armed(1, event.value);
+                       case AO_BUTTON_ARM:
+                               ao_lco_set_armed(event.value);
                                break;
-#endif
                        case AO_BUTTON_FIRE:
                                if (ao_lco_armed) {
                                        ao_lco_firing = event.value;
@@ -185,6 +187,7 @@ ao_lco_igniter_status(void)
        uint8_t         t = 0;
 
        for (;;) {
+               uint8_t all_status;
                ao_sleep(&ao_pad_query);
                while (ao_lco_suspended) {
                        ao_led_off(AO_LED_GREEN|AO_LED_AMBER|AO_LED_RED|AO_LED_REMOTE_ARM);
@@ -192,13 +195,14 @@ ao_lco_igniter_status(void)
                                ao_led_off(continuity_led[c]);
                        ao_sleep(&ao_lco_suspended);
                }
-               PRINTD(DEBUG_STATUS, "RSSI %d VALID %d\n", ao_radio_cmac_rssi, ao_lco_valid);
+               PRINTD(DEBUG_STATUS, "RSSI %d VALID %d channels %d arm_status %d\n",
+                      ao_radio_cmac_rssi, ao_lco_valid,
+                      ao_lco_channels, ao_pad_query.arm_status);
                if (!(ao_lco_valid & AO_LCO_VALID_LAST)) {
                        ao_led_on(AO_LED_RED);
                        ao_led_off(AO_LED_GREEN|AO_LED_AMBER);
-                       continue;
-               }
-               if (ao_radio_cmac_rssi < -90) {
+                       memset(&ao_pad_query, '\0', sizeof (ao_pad_query));
+               } else if (ao_radio_cmac_rssi < -90) {
                        ao_led_on(AO_LED_AMBER);
                        ao_led_off(AO_LED_RED|AO_LED_GREEN);
                } else {
@@ -210,15 +214,28 @@ ao_lco_igniter_status(void)
                else
                        ao_led_off(AO_LED_REMOTE_ARM);
 
+               all_status = AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_OPEN;
+               for (c = 0; c < 8; c++) {
+                       if (ao_pad_query.channels & (1 << c)) {
+                               uint8_t status = ao_pad_query.igniter_status[c];
+                               if (status > all_status)
+                                       all_status = status;
+                               PRINTD(DEBUG_STATUS, "\tchannel %d status %d\n", c, status);
+                       }
+               }
                for (c = 0; c < AO_LED_CONTINUITY_NUM; c++) {
-                       uint8_t status;
-
-                       if (ao_pad_query.channels & (1 << c))
-                               status = ao_pad_query.igniter_status[c];
-                       else
-                               status = AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_OPEN;
-                       PRINTD(DEBUG_STATUS, "\tchannel %d status %d\n", c, status);
-                       if (status == AO_PAD_IGNITER_STATUS_GOOD_IGNITER_RELAY_OPEN)
+                       uint8_t on = 0;
+                       if (c == (ao_lco_box - ao_config.pad_box) % AO_LED_CONTINUITY_NUM) {
+                               switch (all_status) {
+                               case AO_PAD_IGNITER_STATUS_GOOD_IGNITER_RELAY_OPEN:
+                                       on = 1;
+                                       break;
+                               case AO_PAD_IGNITER_STATUS_NO_IGNITER_RELAY_CLOSED:
+                               case AO_PAD_IGNITER_STATUS_UNKNOWN:
+                                       on = t & 1;
+                               }
+                       }
+                       if (on)
                                ao_led_on(continuity_led[c]);
                        else
                                ao_led_off(continuity_led[c]);
@@ -254,10 +271,14 @@ ao_lco_monitor(void)
 {
        uint16_t                delay;
 
+       ao_config_get();
+       ao_lco_set_box(ao_button_get(AO_BUTTON_BOX));
        ao_add_task(&ao_lco_input_task, ao_lco_input, "lco input");
        ao_add_task(&ao_lco_arm_warn_task, ao_lco_arm_warn, "lco arm warn");
        ao_add_task(&ao_lco_igniter_status_task, ao_lco_igniter_status, "lco igniter status");
+       ao_led_on(~0);
        ao_beep_for(AO_BEEP_MID, AO_MS_TO_TICKS(200));
+       ao_led_off(~0);
        for (;;) {
                while (ao_lco_suspended)
                        ao_sleep(&ao_lco_suspended);
@@ -270,13 +291,11 @@ ao_lco_monitor(void)
                } else {
                        ao_lco_get_channels();
                        if (ao_lco_armed) {
-                               if (ao_lco_selected) {
-                                       PRINTD(DEBUG_STATUS, "Arming pads %x\n",
-                                              ao_lco_selected);
-                                       if (ao_lco_valid & AO_LCO_VALID_EVER) {
-                                               ao_lco_arm(ao_lco_box, ao_lco_selected, ao_lco_tick_offset);
-                                               ao_delay(AO_MS_TO_TICKS(10));
-                                       }
+                               PRINTD(DEBUG_STATUS, "Arming pads %x\n",
+                                      ao_lco_armed);
+                               if (ao_lco_valid & AO_LCO_VALID_EVER) {
+                                       ao_lco_arm(ao_lco_box, ao_lco_armed, ao_lco_tick_offset);
+                                       ao_delay(AO_MS_TO_TICKS(10));
                                }
                        }
                }
index 45b670120436e3eee2c015b06b216289b6cd9b80..62e97868e1f7e445cd4b63262ec9306343041a53 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e6c7bb4db0c0f8d5e23a66261d8de690546e24bc..b506b0a7c9394ee5bac8fd36ace6a8ea065dfe4f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c36858add00bd4eb83711665b233d43111857486..b9f1709c9cf57ae2dd20ba3897ad1975f6c8a720 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e57e3377ca152259bb38c8f5bd4b3bd901d0e57c..87f7384ddeea7f6fcefdb84bd577fae0b30d8ef9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c04580277207e9bbe6fd05771a12b8232f8f3ef5..650407ad8b679d8f98478e82e84da422b1c3bdce 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dc3a9fbfa0e9f664d15f04726641ffd306edc104..ae42d4b4eed18ad601ccb9f31ea68e019a2aebd6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 53cbf9d7eaa6143c1fdf76df4e017544143c318d..2d355c9fd0449018bbadc13837822e23d6b49e97 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ef31882ef4ff818628f27e66c458922fdf536140..261df67f7cacfdce5dd0b09fbfb6311f03da8939 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b58178fd136fcce36e6b8aaca4bcd2419b25d1bb..18f99bf8928867c0d7802667fa3ba4fa1c0cfd1a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4d412cbe9ed18ee3e1d47fbdaf1a250230917efa..0e96f60bbff3284e21edd6f78dd03c5cb28a87f7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a74086d9cb4086a2efd0cc2d993295a762dfe677..b7081107e6407766c61d8201919ec11ff5e95855 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 18330eadbec53deb7faf4f8468227f5cdc494bd7..008af5db000ca164135f1ed37c17a59896d14215 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2beda4cbad865f066b047be61f912a4c3c19bd97..e63771e55dd406569be34d44a858787a7e6856c5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0872682fa1c307b237a7f6b82b39422f942270d7..b877128ab0ed78f1ed4da64702e87645b4ccd50c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 99a90e7739970d3954f460c28e7d3c2924801c79..ffa833fef341341eca543fe12077dbe578fd3c32 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d77d105a524d5aa41da53b10216dc932e545d406..648d3005f000172babbfc594cebb6aeaa5bb86af 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6d1b5fae6b6267d1a6457d3066490888d72e8084..09f52a0e4968ccf362d01b17164a69cd9c0792f3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2dd2ffd5adb643cc4ca2fcc60f9d6adcd9a0df8f..1751ebfd033b81188f60afd04e6b5d980054678f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f07c2cba184ddb47fdd67dfaac6bb53be13c4e38..a293d929c39d88bc2d0e6e919d508a0adfda1ac4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0cdcc9fb464b413541e891cac4cc2d392398f53c..deecfb79422b9c2980507a0a00e9eb3344b64842 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d7dda682ac0448787092a4e6531433d0d3bbdb37..a99e4cc597598a5e023572f88711c15c15bb5ccc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 128fcf3284da97183a6fbb0a5da23db87b1a9e1b..79e4b22b4b672d4f75abe1f4579a367cd7c0fc6e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9a0612e58f324e42e0f4da9f6c4629b7f851ab9e..2f1dab29fc0e51c14a8f1a4d30f00dbc73402e60 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2957f70da0c46ab4f74716d8e9ea9571ddc9c173..9dccdd29049333068cc79c145d26371c9a869cba 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a98e261a853a478ce457cbb9c61c42efeef81151..7ef32ef3f6398012625b2ad10b1b921edf86e8c1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2ba7f699354b2dbdda9285fcf538cad178c951fb..793cdf760c0c3713b459870d3c25b52de17675b2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 996e98d9a6e5f6832023a2975a9979e50817fa8e..775318f94816fe008294ec62a054243a85540ea7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 47188ef3cf171ade2d34e5d6e1d1155e8ca149bd..4b17c5e3ebac427c2d3856a3485f8306ee23afe0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 50b70c73fd24a1d63d2dc67e226fa34915586f21..8f794efc13b57f6eb3676161d998d0045d7ea3e2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b48a41129a5cdf72e9766a2bb39202a5e50e4d4d..78978e3e02150b63b25bd670b2118b549532d846 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e1df347a18ec682f192da6bb07fa14d2352dcf8a..23059c443ea1a141398e3349bffdbcb9440c915b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f1339ee5a543c43d998ce3c5da962489079f6cdb..d2e1248f70f61e12f9fc3dee48005700ca5f8f8c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f997f3b55776c87e3d2e93f14d1e1b24f3f88289..bdac98c71fa0da4cfff0ec3177b62dbd8ed8ad91 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e69cd30b3f8d37ec883aba669e3ef33d8a36c1de..d89cc81a3809610c36ffbb212a20c9b2ff34d0e7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 78577428f5a6edcb5550b36f6d913ca1cdc99b34..307a20fd3e0b3431236e85e001777a69c39db54c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4ac6ee5e991ada7dfacb82fdc0f5a51cdb6485a9..85034efd767f7337ebbabbff75a428fccd6b8e73 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -96,18 +97,7 @@ ao_trng_send_raw(void)
 
 #endif
 
-/* Make sure there's at least 8 bits of variance in the samples */
-#define MIN_VARIANCE           (128 * 128)
-
-/* Make sure the signal is spread around a bit */
-#define MAX_VARIANCE           (512 * 512)
-
-#define ADD_STATS(value) do {                  \
-               sum += (value);                 \
-               sum2 += (value) * (value);      \
-       } while(0)
-
-#define VARIANCE(n)    ((sum2 - (sum / (n) * sum)) / (n))
+static uint32_t        previous[AO_USB_IN_SIZE / sizeof (uint16_t)];
 
 static int
 ao_trng_get_cooked(uint16_t *buf)
@@ -115,29 +105,24 @@ ao_trng_get_cooked(uint16_t *buf)
        uint16_t        i;
        uint16_t        t;
        uint32_t        *rnd = (uint32_t *) ao_adc_ring;
-       int32_t         sum, sum2, var;
+       uint8_t         mismatch = 0;
 
-       sum = sum2 = 0;
        t = ao_adc_get(AO_USB_IN_SIZE) >> 1;            /* one 16-bit value per output byte */
        for (i = 0; i < AO_USB_IN_SIZE / sizeof (uint16_t); i++) {
                uint32_t        v;
-               uint16_t        v1, v2;
 
                /* Fetch two values in one operation */
                v = rnd[t];
+               if (v != previous[i]) {
+                       mismatch = 1;
+                       previous[i] = v;
+               }
                t = (t + 1) & ((AO_ADC_RING_SIZE >> 1) - 1);
 
                *buf++ = ao_crc_in_32_out_16(v);
-
-               v1 = v;
-               v2 = v >> 16;
-
-               ADD_STATS(v1);
-               ADD_STATS(v2);
        }
        ao_adc_ack(AO_USB_IN_SIZE);
-       var = VARIANCE(2 * AO_USB_IN_SIZE / sizeof (uint16_t));
-       return var >= MIN_VARIANCE && var <= MAX_VARIANCE;
+       return mismatch;
 }
 
 #define AO_TRNG_START_WAIT     1024
index 83312d59da35cb7490d3380e6a9174c1e2c138a0..4a41637fe17196513c3b6474a9ff516e233605b3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 096a5564ccef144d39e30921e16b57c137c850ba..1a877fcb4266e680db17580343309842dbfc7013 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 73e1559d246eaa3d1b4dcd228d6f423245d04c3c..e40475f6697a7cc708d827662a588728c9d64607 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e217c33c5436633dceed6f65a30a5e48f211d159..9848c36779c4dfd352f71e3c0f7ef17a7b3d6b0f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -36,14 +37,14 @@ int
 main(void)
 {
        ao_clock_init();
-       
+
 #if HAS_STACK_GUARD
        ao_mpu_init();
 #endif
 
        ao_task_init();
        ao_led_init(LEDS_AVAILABLE);
-       ao_led_on(AO_LED_GREEN);
+       ao_led_on(LEDS_AVAILABLE);
        ao_timer_init();
 
        ao_i2c_init();
@@ -72,7 +73,7 @@ main(void)
 
        ao_eeprom_init();
        ao_storage_init();
-       
+
        ao_flight_init();
        ao_log_init();
        ao_report_init();
@@ -89,7 +90,8 @@ main(void)
 #if HAS_SAMPLE_PROFILE
        ao_sample_profile_init();
 #endif
-       
+
+       ao_led_off(LEDS_AVAILABLE);
        ao_start_scheduler();
        return 0;
 }
index 773e58d9709cdff034b5e7632bbbe2bec8afd4fb..42a8b09c4de723b1c767cc44e4478786e4fde1f7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 445289bf6540035ae8fa900bf1166a86e3efffbb..858e5916e1e5baf8886f82f66a636819c4a22700 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 97230b619eb11d4294c38f856170f9450b6c7670..6025219df44a26f4c0b1ec6cd8425744792dcb7e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1d794497af0600dd2046dc765b97779a2628a413..5983bb9e9ff1a9627857079caa917aa360e22583 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4330151d50c039953da72b77bd43b31be7820c0c..9e02d36592e5ce1aee2015da323461b0bfc89fcb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 55fde04cc658d55c87816cae1217dc0cae2e6e7a..a91b28d845211cfc191400e721f3de0345b3ec6b 100755 (executable)
@@ -5,7 +5,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index efbbf1abee9193eb92f01287f1c13ed8b0f8342a..b676a47b1ddcfd357ceb3b1a44685dc61b64ad7c 100644 (file)
@@ -5,7 +5,8 @@ load "matrix.5c"
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1b0803845864cb6883ad3b37fba96d3381002671..97404e17c08a8233d34fe067ed27cf21e34ecf75 100644 (file)
@@ -5,7 +5,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0086c6db90a06c496e76dd2d247fecd26b271368..7c6c286ecc54ccd5a04b13bf1a9d1168fe7b333f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 667648f566b8eb509c684081b4e1f5ceaf1e8cab..99a522dbeb4027cc19c52072c12d225511715125 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 27a16606010ff8f629c30755ed1e9ec39aeea1c3..fb41d7a9ff8b024ac133f879cdac222d5ec05b3e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -639,6 +640,12 @@ ao_radio_continuity(uint8_t c);
 void
 ao_radio_rdf_abort(void);
 
+void
+ao_radio_test_on(void);
+
+void
+ao_radio_test_off(void);
+
 void
 ao_radio_init(void);
 
@@ -666,6 +673,7 @@ extern __xdata union ao_monitor ao_monitor_ring[AO_MONITOR_RING];
 #define ao_monitor_ring_next(n)        (((n) + 1) & (AO_MONITOR_RING - 1))
 #define ao_monitor_ring_prev(n)        (((n) - 1) & (AO_MONITOR_RING - 1))
 
+extern __xdata uint8_t ao_monitoring_mutex;
 extern __data uint8_t ao_monitoring;
 extern __data uint8_t ao_monitor_head;
 
index 373db1c4794ccf81ad5f4496e3ba997c59d29860..ffa6f07c1a49c8b6db2d4674336b06da02aa1bd9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c47bc2db22f6921eeee524d46240e04951d89ac9..5ae984249bc4748cc7b27877ab23d44bc16ec66c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 904a9c084660ac83df8d8ad15c447c9f3742fa41..47b69e25bb747d1b81981194fd29ee2f983034d7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9d6ecf2766f830ed295e2853162ea9c7434681d1..085dd5b12f42d27ff27745eb6adf4c4ba81bcad2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 62392d254d6461604e4c34947be99b2b56cf50e0..0977cf657fffc8bbd9b72f2f78e72d72dcba6130 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 484e5d7ff3a08f949ba047776b7c3c54b64febdb..f67dc9f74f3d9b1088eb6a343f35fffc3a6f40d4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d2f583ef7d8c795bf6cafe18bd6db3faebf9a164..10716afd5e8e0ffe9fab17fb459874a6dfa748d5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -393,11 +394,17 @@ ao_cmd(void)
                        if (func)
                                break;
                }
+#if HAS_MONITOR
+               ao_mutex_get(&ao_monitoring_mutex);
+#endif
                if (func)
                        (*func)();
                else
                        ao_cmd_status = ao_cmd_syntax_error;
                report();
+#if HAS_MONITOR
+               ao_mutex_put(&ao_monitoring_mutex);
+#endif
        }
 }
 
index 035325a3ef0e3c0a3cbe129717247af77b055866..4c16145564fb7a86e30691e224c6a643929fa5ec 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f95ca8933cc3f526c15a9c7d2acf2d7efea4f9c4..5dda1c85009094855eb7e15436ec64d6f0c73da9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3c73ea4948d6264f82c6d7079df5c2706dcaa912..f730c73c99df9764a4991bf0940e136a216117ce 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index db1f2301d2c9ecaffc18b0f67f661b08b74d683a..1cd623459ca860512799b57e0ec3626de048a669 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 410815b68bcdabac38d417a75d70910b0de91578..8ae0e7c93bcedd95d90e8e4f3db299c0be09e3ae 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 954228621e2ed10f45493b4bfea8d93005c8833a..e0ee2928cfa8fd569e260fc05d46161b1d6eefba 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 87e7684114915c1fd24ea766fd4f28110b6f82cc..c8debbc57d2df707a3fb1989842bc589d082387d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f697e74892048955ba8ae1bfc1122c272cc04b07..5afedfa5bcd5c72c98af9ec0a8e4ed67cdaaa3e6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6a3d02a130087140eb43e9cdbc6f58d7992b7d3e..35d42b8f02fa10aff483622df37df828815f61fc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6ee0965d4e732ed4ce25adec78ac11231942356e..d62852efd69cdc707a7dacf8c49e2f898e18514c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 181e6ec29bd86123e1ad7f63021f40388fe1d409..abf9e6db11de44725eeea871c12264260e5cb578 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b9d677290fc274a671fc718a4de6aa1250619dd6..42efc2dda7af406ffed74e540a985eb63cb6b9a0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 19c620f56b879daa108259cc2ccba11ef85ea5ac..d6ac21f00a2ee50a14028d388881bdb05247ea5c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5654182aa733e71a4005090e86c352974f2abe7a..481a53c11c5bbdc14b8392895d221d90d7204368 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6762434e41ba26e29b6a03da88a1bdaee50ca807..63f43a7ba52fbc0fb4507f8325d092a6a09b390c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7fcfcab051340df4edb4b9556919da2a2558ce35..84c1300091f2c91c3f0dcc0cd352b3064548b5d7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 915522bfccfaddb5878d845ca37c4f652c7f44fa..bd8b67251d951851df6673d72d77cf92f80c2fd4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 11329bb9c06743e269df3170eb6044dece95cbce..5880cf2b607eeb335edb19ed7b467cc230770dd1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 172fc589f55b7a466d76dd4f0cd685db79a61785..5e7d1572b0847962dbf7ac46214eff05d4f922bf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 90fb3930ff47dd36b6f50547023c16d8799a352d..3b419180bd681fb087b3dc96d85b60f769714178 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 618756c1ce7ea3984959334a7852213c1b6db462..9ccc3af1d1df0dc28e66194e3271eaee31d1a199 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c4f5559a11f8ea79b07d069e99ee60a2208fe58f..8e4a852221aac60e869576348acae5bab01dab51 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4941d74581254ec26402218b9ed952cdbc03138b..3feb1301fc05905582e5ff5936286531e52a5b26 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9031a54ae070e97e42a6d182e0d4b802e9897918..50f2b68f998f3df1c7960bfb64ffb6153e15de6f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 01d21c119538701bccb08de33df65c93180e9ae1..6894fe59815a0fa01edb9b4edba123bc7ecfa2e9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 406d81adc5f1cde7d90763dcecfa3f3059114db1..d849dc6483c0c28376d9d6f7d78e0b92f549bc11 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2a937183f309466cd975341bc59a625969d5d498..721b52d08d8b3ad5c119a1d49b811587024aa6b7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1897dc086d2a2d016c80f3346d40314d9810e696..2fe28f6656279ac2d6c7cf0cb393cca277613910 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 12496f6fdf785a2d94f5fac84c239092ede0e004..6478dae29934576923c314252084c0a458296430 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6d9ee346ae4268312bb6ba800f9823786ed05329..b1183badade6440ccb61538df4d1dd40d83184a3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7ef98a972aefc7661166084aba65ebd05030ba02..39688fea70693816b1cd70630f9b7265a18e4830 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f3711fb19a9603390b8a9cc52b82a2c195c78897..8a29865577b19a31ec0a7970031a69b20dd9dc4d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8ce074fe33f97bb2ba7bc4d9119bce940ac06d8c..508f151950bd9730e76b0f2ca1a3b02932f0868c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e45cd795bbbd14aaf0ec967a85d5a1856f5786e8..ec19776946aad3cf17a026ea70347443f1a8a52e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6eb752c9636f8e2f9645eabbc7e1e1bc1105e71f..a7fa5ec2fa4d498a1220093a86f4ea1579792fef 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 823d003c8a0a7574f43859a75de6c2af1ec7c315..52d9d77e25e76fb996111dd2a879326a7180a8ab 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ca75751b21d6625219e033ba01392d3e9c56aa52..fdea61c031f726b0c692b379cb8d8263fd994a6c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b16db58c3eb92e3557d3b38b66dad47898b78f20..11c164042cd2a5fb46a470f3b6c52deb98c36dbd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7b0f8145d807ce74bd5db66c0d23408251a8d745..69a1b3de6ddc9a32350605e7e31f19b9b4c198da 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f7e1391a177459440aa5bd566588a37d41037551..3ed8c64cf170c456c5122fff1a588a706aadf306 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d9a0914a761cb931bdc4d92bf7388ad8cb4839f8..7de092373e9e943fda8a5ed9805bd71ae65743a0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8a6fa4d92eb90571ec949f3db17a02215b9e90df..e2df6885d72fd98ae2c8599b38e132ae6f0ae7f1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 40a96ef7f259fa4811d6faa11c9567fbd323b6ec..0589b4b00513b4fb8b80b03d22b7275dfc510a2b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fdd428c223eb84c1ee13615243d09cfa6563fc82..13eb05bfd7ee4c32aed8120909a779a2440cb69a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8f57bf75048fa7f2ba18500ba7b6af42d1bb193b..e32abd1a69cc7dc18214c3d506d1470b6ffca62e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7643091cdaa759964cdb5b3e7a214eb8c2df55f5..02551169fd46f80a18a8839f5518ef9d63c22da1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a9e8c83168be867353df51be4b8ece3a4cef40bd..cc947d6e8c634f2b2a404ba33705e2449abe7e32 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cb83be4b1cd3850d5598d769b2d1df1acd47563f..a0212198d3a0ae70128fc3198d259c14b9446ccb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 08e7b8c4c6a03fbd38b636977fbbcbfaeb22553f..154b1740c6b41cfe93b40ab865fe84c309f72960 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index aef78def446d7fe09f7fb13ee4407629d0ddd249..aa0f5c76c45f9c3277d638fa090f777b5946d55f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 976852ee2acd13c2e5cc561aae8525668b06d641..ec5cf3ed60409860ac04c9b6b189015f78c63b24 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 844f38aa6929a6e0946206aaa6cc5a13fc04bfc9..d5735cdc4a8c66a0c7cc3c24a907ec967aaa64db 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3f6235a6a73c62685de6df5ed124a8ff116434d1..63768e1aa4724b008b22bebd717a23acdfd9e769 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 095aca371d0227b0851a143b8e567ef4a6e6a261..1305a84d13137bfc0375a7e5a48efe7621fb61df 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 002a10bd9fd8dab64f5f407b60cf76787140ae04..3f514f18fe100fa205fee7de2f330c43382713e4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 67767dc9ce285c88aeaa0510889be3aa906e8557..7769b7b5749773c3ffa51a42c90e138d83297172 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f7521f218cbb376b662c10bb82174a6ad1c75c58..f415420d6ea900015e220f894f5e0a0bdbf16e0d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 75a29cc41d9d7a43e1a817f3d7289717e479a742..ff543cc43ec8916c0c5475f5246fd43cbb5054d5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cba0d80af603a778c57a7e275b0db7ae72b3b0c6..7cbee28815b611775beb4ec1e1785f7040995a46 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,6 +36,7 @@
 #error Must define AO_MONITOR_LED
 #endif
 
+__xdata uint8_t ao_monitoring_mutex;
 __data uint8_t ao_monitoring;
 static __data uint8_t ao_monitor_disabled;
 static __data uint8_t ao_internal_monitoring;
@@ -240,6 +242,7 @@ ao_monitor_put(void)
                        printf ("rx cleanup: %d\n", ao_rx_done_tick - ao_fec_decode_end);
                }
 #endif
+                       ao_mutex_get(&ao_monitoring_mutex);
                        printf("TELEM ");
                        hex((uint8_t) (ao_monitoring + 2));
                        sum = 0x5a;
@@ -250,6 +253,7 @@ ao_monitor_put(void)
                        }
                        hex(sum);
                        putchar ('\n');
+                       ao_mutex_put(&ao_monitoring_mutex);
 #if HAS_RSSI
                        if (recv_raw.packet[ao_monitoring + 1] & AO_RADIO_STATUS_CRC_OK) {
                                rssi = AO_RSSI_FROM_RADIO(recv_raw.packet[ao_monitoring]);
index a36fe93940906efdefaa37e616e0fa762f9daa88..ff73e3bc6998410e29bafbdcc459ba305e0fd7a3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6f967e6d2201db4d520f5410c33f7a038f00491d..00fe1ed61fc78d150dcf4e22102415e999d9d948 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6b6b5bb8df7d414dc2741edd59431d30ba5d1070..a4446726c4540c3aa2c93fdd194f4978cdb2e30b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 136609c3b0865c7dbc3772f2997cadc3acb173bf..9d99b0e6f1c8c34a53e24aaba8595be926502514 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e280f98c57a77253d692e968ded0450cb56e3091..3feecd5afd219c91b53877a971c0a3740db47196 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bead5944009d2c4207d802e689c8abbf1da2e049..bf59ab5396503fbe5db1fc1b408db767c26921d6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 98a8c1c77560927e0c134f62a54ab2b7fade2de6..304c45a4fba92960c7adc09442710be212c3912e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3a829b3a654736e58539a7b57d22f7cc7239ed4d..c4df9f264aa6f0d284ddb53e26896f4535cf2c16 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 43e73de4a897cfa97ee6cdc851f4c7ef373727f1..c9920ab335cd681369ad8e78e893f8b1bd49b021 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0fde725a617ce42b2df60797b246535aec8a4e62..a730ef1947c21ee683cf39f2f276cdfa9a16db3d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 044f1607d8b4a8aabba54841aaae7da47ec6434a..651083fc061bb9717a4b79b26b8b8a180d910d33 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b6835346f74ff492c73255e2e785355ca2001358..92b365a28569020825d4fdc201183813d24d21b6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e86f31e96754043fb45e098b1d7a72d616f046da..74fe8c600886c15e388c438f4af8968b99bdf7e8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 64410921e436a953d15a5a1d5e4a0e89dbfedacd..6d29f3925b186a5478fb4802bd11fe052e413f29 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6b8782de9f166201223def28c313d7c9cda99707..ef89c5b794b429ff954ea656f966fb57cde765f2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f4253b3db9e42f1427a3cda44ec215c13ce74dcf..6592d6168988270cd3cd88d28d1cb1572b1fbc68 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0e8e287f63eae1c123988dd26ee12df95c3868ec..af68457de05f71863cce9341a4247e513e0e3f15 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 793b190b0430ebe47abf510be23e6cbc4c1b3a81..66fb8b57c9f3a036049bf1b565e80240b610915c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 29bf2bf6ed0661a98aab90182b903977c1148880..90ea07adfa6843246dc6d3d52a14ad0298d5f0c3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2ec998bd257adb4a9274447d4111504526c3d829..da40187b0d7effd77aff60a49e63518c57e05007 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d3743d124121abeed7062d1bcf87338d1f7696a5..4819a16144eab837cd2bc93dcad81f246788e477 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dbc29d3d94e8695cb6378e40bd2ff7600e82890a..c633779d46b07d218fb234babf37f7633942a85c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 66315d227e8e05ac8a620e6727e11d44586f00ca..c8a1d46e7d4523a68286914fc84e81dfefb4dd24 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 526f7b55e78dd482a822e5ebb459f1976acddf2f..610109379b6cf36fa3cf8cd7bddfc40b98731691 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e21643ac008f9da659cb72e64a9f316bb7934622..ef3e93d78ba8a323ff45af2267481e6a15f50508 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3a550eaa74e48a4fab3abbe40f1a02cbc18d33f2..ca4678cf25839b1debd8d0a7325800de6ad31aa4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ed197aa52ff9aa3c41e1f001d70273ae9f7185da..08e790be13626b0c504421594db5542de9071352 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1d65fcf5c16589270625bbf45a553c9e35f526b1..b79d465afa4975180faab8b3589b4d97bb210d52 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6eddae7f84dcdd754b8c46d54972d352f19fc754..bee9293e8d1bb1dc7f2a76a9986433b6a5e81a0c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6cc6fcb70797bfa5dbc66fed6979925e58d44c50..59b137ad8e792a7976cc5875c3bf1bbc12331102 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cf0b58ed8eaa0bf939e0e77bc80635b69f6f52db..e8a092aaf660fcf6bbec48706e14d2f7936e297b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0e353fe83a9998fcebffd52e0eb207d8c9002814..f1dbd65426ae709353c0f226eda63a42c76ecaef 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1a8da2918d27a6da805c09e7f68178658e67e7af..1989a02d90715d1ec4d7f1cb69e7c3aee9356b00 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 16363f75a4c26efde892b06d843a354c67e7c376..15085bf4d0b10599d6c8b972eae3d66f7c91cc2c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -293,6 +294,7 @@ ao_send_mini(void)
 
 static __pdata int8_t ao_telemetry_config_max;
 static __pdata int8_t ao_telemetry_config_cur;
+static __pdata uint16_t ao_telemetry_flight_number;
 
 static void
 ao_send_configuration(void)
@@ -301,11 +303,7 @@ ao_send_configuration(void)
        {
                telemetry.generic.type = AO_TELEMETRY_CONFIGURATION;
                telemetry.configuration.device = AO_idProduct_NUMBER;
-#if HAS_LOG
-               telemetry.configuration.flight = ao_log_full() ? 0 : ao_flight_number;
-#else
-               telemetry.configuration.flight = ao_flight_number;
-#endif
+               telemetry.configuration.flight = ao_telemetry_flight_number;
                telemetry.configuration.config_major = AO_CONFIG_MAJOR;
                telemetry.configuration.config_minor = AO_CONFIG_MINOR;
 #if AO_idProduct_NUMBER == 0x25 && HAS_ADC
@@ -405,6 +403,11 @@ ao_telemetry(void)
        while (!ao_flight_number)
                ao_sleep(&ao_flight_number);
 
+       ao_telemetry_flight_number = ao_flight_number;
+#if HAS_LOG
+       if (ao_log_full())
+               ao_telemetry_flight_number = 0;
+#endif
        telemetry.generic.serial = ao_serial_number;
        for (;;) {
                while (ao_telemetry_interval == 0)
index 672d23175f71598f8341bc4ff0cf217068215ef4..c0f5e3c532cb7ff7c46796a1dd9aa292b48e02ac 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 962f145d39a4b0e21ae6b27017fdc1348a6b92a7..4abd309a99b1fa931c0f083f1e2e45606a0067c5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 78c40cb4cad949710f007776ca28de48fb50a703..7d534339808ef5950465acbc053cb0b884ce09c9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8f3e7813f4ed308b2f0ef937d8f8f0aec0af72cd..cdea517875f2c4cad7497019cc34424029b8b01c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9df6e456dab3cc34f341e578e0809cb85e960569..84d7610c21036a65b5c21e2448d61ed24cf5c2e0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 032406f812bca9ffbdbd82d409aaaa61e2fff647..db53dcaf15880d956c9d376549b22c8c4c262eff 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 00d4f18a67e275645f9cd34cbe4fcce669199994..e6a6a7edad6ddcdcf6b658bab31e016f495db146 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b24163eeb9daa3b91bdfad259879f8de81c249a7..26a5ea08c73df808bd01420eb9b3588d3978b67c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 42faf06fcaf3d8b1015ca9a0f8a9dcf0c48e8c8a..da21dc9d1779ff7d3b67fc30c0a6d145e07ba4c9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dbb415381ce28c980cf78f31da38ada52fad1f55..5fc0f680fa070923558f847ef477c0b70ee8e0cc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index eb9132b870c1cd4f9916d6fef409d6b8ce093e86..b1211752ae1719060650adc87239a8f130afe935 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9e45ba27f085eaa5e8b2d07515eaa9c14b26adc7..0d0bb91c75f3c5f05bff78cc4025780ebca4c054 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 51ecc0a9097166f4d71e23a40853cf28c7b01e16..e3c7d0c16d3d19e292fe8c1386f8af22c534e5d9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e8599eb436db9221e2e4aff7e77846e29d2ce64a..75f2cf5fd7e7aeb11ca33d2bb34e7d0798908ddf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fdb6a1caa976bef23789dc7aea69669b3b4be550..193f45470b4ca6dee4774c2587f413af1d5c747d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c4f26fc40af8ef41a0f3189f2b17a2d9685b796f..ce4341391b51c0c64bec78dbf0b63e50b2338159 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index aaf66b39b728dd483af16e00dadeebbeb8bce729..fe9761a99f39b53f14095e5b81a5e236ae895136 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2ab548cfa452a4fdfc2706e6b08125d61d3f8c04..47e2abc6950d4c24dfbd3174f285c08df62fbb2e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5a31f39f2a2acfc0851ef963b8a6bba8e4239295..cb1a060668a173ba6e1c4634c26b8ba887924065 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e2243d5ccd8bb9ae71c69d1e56c1f2af9b547940..4330dfd7c1e2048b1ae91a7318c5b082deb0825a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3318db2bd14ea71ed768991c07fa8eaf01291fca..3e0119c6e6639b674925acb08b291718b939501d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a0b293b923a8a3b39a683f7566a49da0cb35fabd..2d2c3972defaaeacbf6fd286173c5c6fc0f55d99 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cbb922ece661f731b4cc2a3ecf2d89cb3dcd955c..4e7bab8dab0884159896d10690dcd67f7bcfd4db 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b0d5fcbc577003cc8076a73684f4f86d6abe2624..0011744d2e931258e1c76898d2a2a8f7e8e86cc4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f091c89c570963542f602c0e7f6d8957116895d4..a8d4cda9229b32d176c480916ff39c55988af6ed 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 623559ebe14c4c69127a62c381d8a1161085a945..166e2f154aa135feab827b5bb3fde19a9ed14f31 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3b3226adac357161453ed3aabce5579a664a8bd5..5c13eb4b40f9ceda4ea620f62606163842ea5c68 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 40d412d01f90b6fabed6fc57e4aa44e1fc348d4c..38dd2aeedb2c222e4351c9d287ff393c736c0772 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0c931611d2d4ec6b4ebd3150a7fcda487156f1cd..568ebd1823fa38e259b5186eb4c6c5da72a20d00 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0ffc2fad3d4c5b2d6699844e476a2633c5a78e09..1bfc83bf062c2b696f0eeaa3e035b15d7eb24c7c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 97dd74cf28ce653dda9b059d8b0a8bbee772da40..3a279663f26d8db27ba9a462008a43a99d478299 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 68d6de60c9d979eec0bf072484772aa8d798e2a3..e6821a3ea93c58af8573596fbe79c2f1f6a04dd5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9edd91f443047b2892bc4e9e26789249779d9d41..4d3ad4ddc5e483bd5a86a3ab913c5f18002601cf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1af92f1317374040d34533229d9791cdbbf37ac7..2b18f8e58d656224f14306611e83d11d617239e1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 346b63a1be735011f76a1e36b89588533d45268f..396b57e3e7e3143c95d3c256a1b2183720cd03f3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 63e9cb1b26663ce0259d2134003d8fa334b54ae0..7cfbca490f17a2f4cb5094f5a8e514734210823e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e1548fb015720bd107f0ffb2322e09945cbe7d54..c16ba0b442fac198c281bbe432f671c7b148b20d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 37885ec2c481cc4a494c6dea697d58fde7d5ae58..50a993464a76cf1554bf1ed1eb0597b4e6ed250c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bd4a06d1e8bd942232d8e7fcf8c143f746611502..713c810a3106530a9e796c3bbf21c9e2cb456562 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4917ee6f9f1f2eb00f364bb7ea146c5e9ccf4101..ff8d3273c03147c038a781e4144f3904295b5c06 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9a12add659a00af10bc62b48b5042b62f834f73e..1f0edb0596a089490929ef494af6dde59b33880f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0a2fbb3565a2a9aa822452267396f25c1604d8e1..6039fc46907eda1ca3c770dc3143f46a1b42f4bb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 54522d869aa1a8e8f895b73b46fae1b518a80b09..f9960eb8f17530796faa857294ebbc58a4e41545 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 622f5a69700a13eda68311b8a0114691556c5efc..6dc7a465167318d7d9984efcf743ef07f53c8d80 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8bfd8b845e73052080a682e739a64153e2e32a27..9e0d7662b21d41c56651a73935e7cd3d40903e1e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dde66090ddfca6d9b902768a82e3b86366b67dcd..9e155555dcaf0eac5a7c3ced74be5bdda5a5d243 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 221498d6aa19305cfb697d3699198d042590c56e..a10cb384332f9f570f4f03f7e7ff0424303de238 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a0d8e18af08c4baf34d71ac98710b4f09bdd403d..b192763df0593817f171b3c45d01cfc26ad69865 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 77750efda72f16273863bcf52f8ca148bb03da16..ac08979f9d976ba872eca6510b99d5e1f3cf6b53 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6f09be64e9aa7daa1094f5cf0476437a7f6efc87..5b8e38c2cde37249cac1b3b9193b70aba7e8e773 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2888c2668df1f2fc198674df0b68b944f4980f8f..28bf7e7995c9c3f90c195eafb7e190937d9f05e8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e739ae0b7af5948e4e46aef501912fc7a7fc617b..0142f9e329004ab713504c3a351490c3f0de49ed 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4f7530f7b3a61b957531a067c9b85a043f6fb2d6..4e865378641ded8f26fc29b792c4c85978a40730 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1e7b5dcd58511cd8a4dec4a915b7642e2e306dfd..c2bbc30e12114e14d93408858de3df02e513fe52 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 273a73b51421c4b1f21325095bf9085b1f6e0214..d1c60804b6620da6d42ec3bd14311f088531ab03 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b1a96bdd1cfcf3acd5c357302135a7782a1c1cdb..77321a02f348a9b8460fa5a69625655ae10ec200 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cf01c9c601355e1df33f429cee7d464c75c20ad6..472da16f9484fbae5f75ef7a4550931f841f30cf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index de9ea7068aeed5c076abf6a479ac6367e4cf6145..07d33aa404bebd2616997ecc0b87fb8f8b5fe5f1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2c7d5282f0e7d23386ee6a4c194ceb41f1481649..29d0d71632d5b92197bb249617f5e519da1b0eeb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c5fad4a320b975e87051fd44ba50201fcd7f438c..b9c6d5d69f548c83741490b97030fc7cc5553880 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 10d50cd676c0533645654a3da532a402b9f88657..dcdcf07394d22ad4bcb6b9a358114066d385a56b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ffc5d2d873b3f7d8e176d3edc2cf2d7428af3b8a..db432c2ae91a6f257a6a02847aa88f02c868e7ff 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 885b9db6f5717834eaa1bc5d1bbe3fb35b08fed5..233537dffdcb765d9de35033c62ad11adc2b8a04 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4c59101a3f597e67fb0bca8244f3891d111d72e8..eb5fcb8b497452ba2f90923dd0e9b46193a674b4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d6c7265348e317856ff0f474bcaccec66a39e81d..853b6841fca83f612d2e805f56e2affb4d31dcbb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0753f5f7288d45ae9805a7a625d23688b8d46a02..a4a7dc43fe60c05381d2ff87b9ddd4e7628a0858 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1143a08b8cc178a1aacd0f7403a3faad004dea4b..098454e15f20fab2cde1da52e52adb6cdadac62e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3106cc3b7ca83dcc6b3e54600ad039abb2884324..6a8c7113e9c6a433f2208b12995b04ab777dafd4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 67416a9d43ae9a5a2fec6f3f03f5dcd85031b8fd..77f121dcae435289faa3a71cba15627143d905b0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f9508b8f2f4c92401c196e702720a74f70f50e70..0cc29376aaf271c7002f9bef72fa7e3fb1b7307c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a796891d53b24b9fe4b40179ecee94543029a0eb..18ca20dab69b2b2dec06a643a01372a92a141215 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -136,7 +137,7 @@ void
 ao_spi_recv(void *block, uint16_t len, uint8_t spi_index);
 
 void
-ao_spi_duplex(void *out, void *in, uint16_t len, uint8_t spi_index);
+ao_spi_duplex(const void *out, void *in, uint16_t len, uint8_t spi_index);
 
 extern uint16_t        ao_spi_speed[STM_NUM_SPI];
 
index a95d869bdf7caacfd6eca90e66899196cacdf8bb..0b4e6012ef584c29471a63cebdb34881a6ef9f8f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bcebf033ed5b9fa78dd19e80daf240262e5ed9ee..488af1e1b8dffc2261e303aa3b3981b3a69f29f7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e825b618299bbe416e27153cfa0b331955d5e12b..4b5dc2ac480341086e4264284b9345d2e5da299c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0135de48e9e9131e619a8fc81b493ee23dfed4a8..6d77966076a88aefeac0f8a281fa81b5ebe0b662 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4207a8607e3d593df3482505ad5ca42eb411d385..05f880b851d351fa24c33e388e55a0f93923b3d2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ebea224d03d48934507e3673d5d049ba9bc2324e..4f3e6132c44cca322e8d892249127654ec8d6e83 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 925f9a222f50020cf9f82bad6ac0c34b9ba026da..3e0b3e5c84e29953833bdf235503c68932504f98 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9a73eb51c30c3c2e1562907124e9d44c3768cb8c..f4378ca874575676c7f105b4af28622b20074e7f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 09ca5ac12e223a5c7078f49988c9d6dd6d5ad7a7..d191d80d0d194452701bf98020dd886e4b8d1ffc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6bf89234b702a18a9d9caa1a64b7ff9e84e1e463..a8d1701b318dbead80640f393daeed3cc3f024cb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 39dc81444a1bb23bc1e48e885b9d594f213094b9..c1648421cd61727f65bd0581aaac2e5d2fb7174b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d157a2265eae9e85b4270bc29bbd91ddc1c6e22e..d5893c80a4cc96db463c0891087a6d883e92bf69 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 158f5b218ebfe0edd877b4049322fb11b51f18fd..29a8f173f948682d81b1f367d07b20ec7c0687fe 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -137,7 +138,7 @@ ao_i2c_ev_isr(uint8_t index)
                ao_wakeup(&ao_i2c_state[index]);
        }
        if (sr1 & (1 << STM_I2C_SR1_RXNE)) {
-               if (ao_i2c_recv_len[index]) {                   
+               if (ao_i2c_recv_len[index]) {
                        *(ao_i2c_recv_data[index]++) = stm_i2c->dr;
                        if (!--ao_i2c_recv_len[index])
                                ao_wakeup(&ao_i2c_recv_len[index]);
@@ -254,7 +255,7 @@ ao_i2c_send(void *block, uint16_t len, uint8_t index, uint8_t stop)
                            (0 << STM_DMA_CCR_PINC) |
                            (0 << STM_DMA_CCR_CIRC) |
                            (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR));
-                          
+
        ao_dma_start(tx_dma_index);
        ao_arch_block_interrupts();
        while (!ao_dma_done[tx_dma_index])
@@ -330,7 +331,7 @@ ao_i2c_recv(void *block, uint16_t len, uint8_t index, uint8_t stop)
                                    block,
                                    len,
                                    (0 << STM_DMA_CCR_MEM2MEM) |
-                                   (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+                                   (STM_DMA_CCR_PL_HIGH << STM_DMA_CCR_PL) |
                                    (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
                                    (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
                                    (1 << STM_DMA_CCR_MINC) |
index 56cce0c02ff90af23fac42ee05af44783b59626c..eb1ed0b52ba1caa8698da8418709c64c96923a15 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0d7d87c10b8dd38dd654abe907f3ee597daef835..b1664b1381f0ad2b9853bb982b7ddec65117fb1f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 95af53d1b1aacc5cc1a612416385a6af5f927ae3..10d5d620731497c599610fca601d9f5348d664b1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 14667546975524adb05bc4832e367a4c00c43c47..1b7691746696ff4f234ddee2d99be53293e6dde9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9b61cf622e6f7e1fef9a05e47b4663b49a3f9c8d..0f39befb9426843f1f63d260ff9c77509b187351 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cc6132a5e908f56137f14a2cbccaccc2079feeea..f26e132a175c3e6a2bab0be671f4b6b0d4313456 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 969d7446dd5a22edb4e291baa797933103f1bd67..b3102ff513c6ee87b1a9c8cdcd9bcc57b45587f0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 149ca29ff67e91d0939ece470250f6773d3a4b01..fc6bbad7f34097f07d7164b619fc62a03ff09994 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f8a0c25e97eb6632eb72ea2d1f3b8fae3e28ca31..3bf8c0b036cbe182abc344ad8dab02ee31d3e332 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ce1fa6f3ea77bd7a8aa339721f24ee765ba6e64d..53000a170f19564ab1d5689559c40ad981099852 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5da15072222dc11c6b5cc786d972a6878263b562..9d5fd6fb8616391d0a0c1b348e2d83c83283d120 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d5af3a57cab5c1b06f04c520a51482651830edb8..4471a01ffcc1152761cb98388d96454b0863b6aa 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1da1bfb4cd4e911818dbd2ecdee88e7e6ef0afc3..f7ba486a7fff6e1902152adb20a66566795590fb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bf07906016387c870213b0ae02316f0deb06b280..db0be992b4fbf65d90a455dbeef5d9cc122613f3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 214092f6bb75922ca075bd404766416b650637e1..05078f3b841b203b9b550040bc191b6aeaeda193 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -84,6 +85,46 @@ validate_spi(struct stm_spi *stm_spi, int which, uint16_t len)
 #define validate_spi(stm_spi, which, len) do { (void) (which); (void) (len); } while (0)
 #endif
 
+static void
+ao_spi_set_dma_mosi(uint8_t id, const void *data, uint16_t len, uint32_t minc)
+{
+       struct stm_spi *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
+
+       ao_dma_set_transfer(mosi_dma_index,
+                           &stm_spi->dr,
+                           (void *) data,
+                           len,
+                           (0 << STM_DMA_CCR_MEM2MEM) |
+                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
+                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
+                           (minc << STM_DMA_CCR_MINC) |
+                           (0 << STM_DMA_CCR_PINC) |
+                           (0 << STM_DMA_CCR_CIRC) |
+                           (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR));
+}
+
+static void
+ao_spi_set_dma_miso(uint8_t id, void *data, uint16_t len, uint32_t minc)
+{
+       struct stm_spi *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
+
+       ao_dma_set_transfer(miso_dma_index,
+                           &stm_spi->dr,
+                           data,
+                           len,
+                           (0 << STM_DMA_CCR_MEM2MEM) |
+                           (STM_DMA_CCR_PL_HIGH << STM_DMA_CCR_PL) |
+                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
+                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
+                           (minc << STM_DMA_CCR_MINC) |
+                           (0 << STM_DMA_CCR_PINC) |
+                           (0 << STM_DMA_CCR_CIRC) |
+                           (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR));
+}
+
 static void
 ao_spi_run(uint8_t id, uint8_t which, uint16_t len)
 {
@@ -123,40 +164,15 @@ void
 ao_spi_send(const void *block, uint16_t len, uint8_t spi_index)
 {
        uint8_t id = AO_SPI_INDEX(spi_index);
-       struct stm_spi *stm_spi = ao_spi_stm_info[id].stm_spi;
-       uint8_t mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
-       uint8_t miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        /* Set up the transmit DMA to deliver data */
-       ao_dma_set_transfer(mosi_dma_index,
-                           &stm_spi->dr,
-                           (void *) block,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (1 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_mosi(id, block, len, 1);
 
        /* Set up the receive DMA -- when this is done, we know the SPI unit
         * is idle. Without this, we'd have to poll waiting for the BSY bit to
         * be cleared
         */
-       ao_dma_set_transfer(miso_dma_index,
-                           &stm_spi->dr,
-                           &spi_dev_null,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (0 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_miso(id, &spi_dev_null, len, 0);
 
        ao_spi_run(id, 1, len);
 }
@@ -165,40 +181,15 @@ void
 ao_spi_send_fixed(uint8_t value, uint16_t len, uint8_t spi_index)
 {
        uint8_t id = AO_SPI_INDEX(spi_index);
-       struct stm_spi *stm_spi = ao_spi_stm_info[id].stm_spi;
-       uint8_t mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
-       uint8_t miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        /* Set up the transmit DMA to deliver data */
-       ao_dma_set_transfer(mosi_dma_index,
-                           &stm_spi->dr,
-                           &value,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (0 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_mosi(id, &value, len, 0);
 
        /* Set up the receive DMA -- when this is done, we know the SPI unit
         * is idle. Without this, we'd have to poll waiting for the BSY bit to
         * be cleared
         */
-       ao_dma_set_transfer(miso_dma_index,
-                           &stm_spi->dr,
-                           &spi_dev_null,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (0 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_miso(id, &spi_dev_null, len, 0);
 
        ao_spi_run(id, 3, len);
 }
@@ -267,78 +258,29 @@ void
 ao_spi_recv(void *block, uint16_t len, uint8_t spi_index)
 {
        uint8_t         id = AO_SPI_INDEX(spi_index);
-       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
-       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
-       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        spi_dev_null = 0xff;
 
        /* Set up transmit DMA to make the SPI hardware actually run */
-       ao_dma_set_transfer(mosi_dma_index,
-                           &stm_spi->dr,
-                           &spi_dev_null,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (0 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_mosi(id, &spi_dev_null, len, 0);
 
        /* Set up the receive DMA to capture data */
-       ao_dma_set_transfer(miso_dma_index,
-                           &stm_spi->dr,
-                           block,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (1 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_miso(id, block, len, 1);
 
        ao_spi_run(id, 9, len);
 }
 
 void
-ao_spi_duplex(void *out, void *in, uint16_t len, uint8_t spi_index)
+ao_spi_duplex(const void *out, void *in, uint16_t len, uint8_t spi_index)
 {
        uint8_t         id = AO_SPI_INDEX(spi_index);
-       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
-       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
-       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        /* Set up transmit DMA to send data */
-       ao_dma_set_transfer(mosi_dma_index,
-                           &stm_spi->dr,
-                           out,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (1 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_mosi(id, out, len, 1);
 
        /* Set up the receive DMA to capture data */
-       ao_dma_set_transfer(miso_dma_index,
-                           &stm_spi->dr,
-                           in,
-                           len,
-                           (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
-                           (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
-                           (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
-                           (1 << STM_DMA_CCR_MINC) |
-                           (0 << STM_DMA_CCR_PINC) |
-                           (0 << STM_DMA_CCR_CIRC) |
-                           (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR));
+       ao_spi_set_dma_miso(id, in, len, 1);
+
        ao_spi_run(id, 11, len);
 }
 
index 962ff2c66eb00f48854f9274f585ee85b152e426..5bb5105d6ccfbbfa96fb5aef647156e974b3e65d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -54,7 +55,7 @@ ao_spi_slave_send(void *block, uint16_t len)
                            block,
                            len,
                            (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+                           (STM_DMA_CCR_PL_HIGH << STM_DMA_CCR_PL) |
                            (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
                            (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
                            (1 << STM_DMA_CCR_MINC) |
@@ -74,7 +75,7 @@ ao_spi_slave_send(void *block, uint16_t len)
                            &spi_dev_null,
                            len,
                            (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+                           (STM_DMA_CCR_PL_VERY_HIGH << STM_DMA_CCR_PL) |
                            (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
                            (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
                            (0 << STM_DMA_CCR_MINC) |
@@ -110,7 +111,7 @@ ao_spi_slave_recv(void *block, uint16_t len)
                            &spi_dev_null,
                            len,
                            (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+                           (STM_DMA_CCR_PL_HIGH << STM_DMA_CCR_PL) |
                            (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
                            (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
                            (0 << STM_DMA_CCR_MINC) |
@@ -127,7 +128,7 @@ ao_spi_slave_recv(void *block, uint16_t len)
                            block,
                            len,
                            (0 << STM_DMA_CCR_MEM2MEM) |
-                           (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+                           (STM_DMA_CCR_PL_VERY_HIGH << STM_DMA_CCR_PL) |
                            (STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
                            (STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
                            (1 << STM_DMA_CCR_MINC) |
index 91ede84bcc5ee7f4e015fb46b6188412c35b6746..f86a51169293e78a4fb930f8e132f19557c378e7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 3d26466b4deee8c607d440a61e372f9e09139a5b..0de501ab5cfac7a05adcf8498e965021add0faf4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 352214ffdbc055c50c8fb44a3cde16dee23ea8d8..463125e25f19ebea5472adbd1c0cab57eaa407ff 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 29d6ae45b2eee46453e7444f91d6c5c6ad835a24..804595bda3f7789e96b35f8ddc27a64f919d0bab 100644 (file)
@@ -60,7 +60,7 @@ $(OBJ): $(INC)
 distclean:     clean
 
 clean:
-       rm -f *.o $(HARDWARE)-$(PROGNAME)-*.elf
+       rm -f *.o $(HARDWARE)-$(PROGNAME)-*.elf $(HARDWARE)-$(PROGNAME)-*.bin
        rm -f ao_product.h
 
 install:
index 86cf18384bb2105e114babc82d81424e4e2cb1d2..c458116b7e63a4af69ccfce3fa7c658727661764 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9dbc83d0b6967116faa6ffe1ce4c57cd305e7a5f..8f8933c6cc452b3769f741cf2bc615500cff4bb3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0a2e2c5c7b13f952ec5e20ede18132381862d2be..5ce3a396e5a0c538fc8f2f3a67e8b2e6afbcd515 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -153,7 +154,7 @@ ao_adc_init(void)
 #endif
 
        /* Set the clock */
-       stm_adc.cfgr2 = STM_ADC_CFGR2_CKMODE_PCLK_2 << STM_ADC_CFGR2_CKMODE;
+       stm_adc.cfgr2 = STM_ADC_CFGR2_CKMODE_ADCCLK << STM_ADC_CFGR2_CKMODE;
 
        /* Shortest sample time */
        stm_adc.smpr = STM_ADC_SMPR_SMP_1_5 << STM_ADC_SMPR_SMP;
index c6903e9fcccb3b1d618eb29793bf861e87d6f659..b8b5e003bd775b7ee50e77dc29fa70bd0b216386 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2597cadc735e8accb7285536d735386fa8069a76..a36482b6746af760c212741d278d5075a4a7bb5d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -114,21 +115,14 @@ extern const uint32_t ao_radio_cal;
 #endif
 
 #define AO_HCLK                (AO_SYSCLK / AO_AHB_PRESCALER)
-#define AO_PCLK1       (AO_HCLK / AO_APB1_PRESCALER)
-#define AO_PCLK2       (AO_HCLK / AO_APB2_PRESCALER)
+#define AO_PCLK                (AO_HCLK / AO_APB_PRESCALER)
 #define AO_SYSTICK     (AO_HCLK)
 #define AO_PANIC_DELAY_SCALE  (AO_SYSCLK / 12000000)
 
-#if AO_APB1_PRESCALER == 1
-#define AO_TIM23467_CLK                AO_PCLK1
+#if AO_APB_PRESCALER == 1
+#define AO_TIM_CLK             AO_PCLK
 #else
-#define AO_TIM23467_CLK                (2 * AO_PCLK1)
-#endif
-
-#if AO_APB2_PRESCALER == 1
-#define AO_TIM91011_CLK                AO_PCLK2
-#else
-#define AO_TIM91011_CLK                (2 * AO_PCLK2)
+#define AO_TIM_CLK             (2 * AO_PCLK)
 #endif
 
 #define AO_STM_NVIC_HIGH_PRIORITY      (0 << 6)
index 64311b23bf6fb6bd17ce96268776f42bcf6de484..8b6234c4e995709da15b1df949b1daf4fc7122fb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -82,7 +83,57 @@ void
 ao_spi_send_fixed(uint8_t value, uint16_t len, uint8_t spi_index);
 
 void
-ao_spi_send_sync(void *block, uint16_t len, uint8_t spi_index);
+ao_spi_send_sync(const void *block, uint16_t len, uint8_t spi_index);
+
+void
+ao_spi_start_bytes(uint8_t spi_index);
+
+void
+ao_spi_stop_bytes(uint8_t spi_index);
+
+static inline void
+ao_spi_send_byte(uint8_t byte, uint8_t spi_index)
+{
+       struct stm_spi  *stm_spi;
+
+       switch (AO_SPI_INDEX(spi_index)) {
+       case 0:
+               stm_spi = &stm_spi1;
+               break;
+       case 1:
+               stm_spi = &stm_spi2;
+               break;
+       }
+
+       while (!(stm_spi->sr & (1 << STM_SPI_SR_TXE)))
+               ;
+       stm_spi->dr = byte;
+       while (!(stm_spi->sr & (1 << STM_SPI_SR_RXNE)))
+               ;
+       (void) stm_spi->dr;
+}
+
+static inline uint8_t
+ao_spi_recv_byte(uint8_t spi_index)
+{
+       struct stm_spi  *stm_spi;
+
+       switch (AO_SPI_INDEX(spi_index)) {
+       case 0:
+               stm_spi = &stm_spi1;
+               break;
+       case 1:
+               stm_spi = &stm_spi2;
+               break;
+       }
+
+       while (!(stm_spi->sr & (1 << STM_SPI_SR_TXE)))
+               ;
+       stm_spi->dr = 0xff;
+       while (!(stm_spi->sr & (1 << STM_SPI_SR_RXNE)))
+               ;
+       return stm_spi->dr;
+}
 
 void
 ao_spi_recv(void *block, uint16_t len, uint8_t spi_index);
index 83a543a02b3edcd31991dae60cf669cab7c9b39b..8f850a0a6d98d7ee1b0484f746dd8f6453e19d43 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e825b618299bbe416e27153cfa0b331955d5e12b..4b5dc2ac480341086e4264284b9345d2e5da299c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cd011d3ab724127b3491bba4083028af3f057951..7acc6f9c0e33df5cb610271d73f3669ffbe982c5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 863f5ef54ed57b2c95b8a51a2c17ce4c3ad91ef9..4eb4540e35bf2aff1cc3371a064add27b3c3b7a9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e90c6bf838b11f4cca1e77df85560f7fe4c344e8..7045514cd206d51adc53f0390c30b383afab9ce4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 192611bd501f01759dae1fefd8509b0a98675042..7452af8ee70dd63325f12313bb16f601e07e45f0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 910afcf7de8814e0897cd46d02bca3a481a66a15..910a36f29221e0ab10e9d0536f88d3698e5d4a78 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 09ca5ac12e223a5c7078f49988c9d6dd6d5ad7a7..d191d80d0d194452701bf98020dd886e4b8d1ffc 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6bf89234b702a18a9d9caa1a64b7ff9e84e1e463..a8d1701b318dbead80640f393daeed3cc3f024cb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5fe0e619fac38d9c8af3f17a634ceb238ba93ac1..2aeff3880fce13f3a91ec545276d8e9ab797538c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ab60b4f3568c7c21474d9413df8a6df439e01d70..80993b247690d6a37264ab88469771c8ed546597 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c7bf07971c407d3db9cdea548de48a2806e26309..024ff948645525e8e3eb06b774542ff975070db9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c6d8ef348febc6e8c05862f00c3d7905fc7428c3..794124834b13c7e74777f33f5aa47c5df8396f35 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9b61cf622e6f7e1fef9a05e47b4663b49a3f9c8d..0f39befb9426843f1f63d260ff9c77509b187351 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index c1e157f52280c9e1fb1839b8043f8148b3478520..f1c10b0b43c93bb05cb6af9d77087a2cdd8a4570 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5da15072222dc11c6b5cc786d972a6878263b562..9d5fd6fb8616391d0a0c1b348e2d83c83283d120 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 55bf59d2f6d6dd4f61b36d56ddc461ba9c76808c..0448ad8c375407167b1eeff93e04597a6dd07f75 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -41,8 +42,6 @@ static const struct ao_spi_stm_info ao_spi_stm_info[STM_NUM_SPI] = {
 
 static uint8_t spi_dev_null;
 
-
-
 #define SPI_CR2        ((0 << STM_SPI_CR2_LDMA_TX) |                           \
                 (0 << STM_SPI_CR2_LDMA_RX) |                           \
                 (1 << STM_SPI_CR2_FRXTH) |                             \
@@ -62,12 +61,86 @@ static uint8_t      spi_dev_null;
                         (0 << STM_SPI_CR2_TXDMAEN) |   \
                         (0 << STM_SPI_CR2_RXDMAEN))
 
+#if DEBUG
+static struct {
+       uint8_t task;
+       uint8_t which;
+       AO_TICK_TYPE tick;
+       uint16_t len;
+} spi_tasks[64];
+static uint8_t spi_task_index;
+
+static void
+validate_spi(struct stm_spi *stm_spi, int which, uint16_t len)
+{
+       uint32_t        sr = stm_spi->sr;
+
+       if (stm_spi != &stm_spi2)
+               return;
+       spi_tasks[spi_task_index].task = ao_cur_task ? ao_cur_task->task_id : 0;
+       spi_tasks[spi_task_index].which = which;
+       spi_tasks[spi_task_index].tick = ao_time();
+       spi_tasks[spi_task_index].len = len;
+       spi_task_index = (spi_task_index + 1) & (63);
+       if (sr & (1 << STM_SPI_SR_FRE))
+               ao_panic(0x40 | 1);
+       if (sr & (1 << STM_SPI_SR_BSY))
+               ao_panic(0x40 | 2);
+       if (sr & (1 << STM_SPI_SR_OVR))
+               ao_panic(0x40 | 3);
+       if (sr & (1 << STM_SPI_SR_MODF))
+               ao_panic(0x40 | 4);
+       if (sr & (1 << STM_SPI_SR_UDR))
+               ao_panic(0x40 | 5);
+       if ((sr & (1 << STM_SPI_SR_TXE)) == 0)
+               ao_panic(0x40 | 6);
+       if (sr & (1 << STM_SPI_SR_RXNE))
+               ao_panic(0x40 | 7);
+       if (which != 5 && which != 6 && which != 13)
+               if (ao_cur_task->task_id != ao_spi_mutex[1])
+                       ao_panic(0x40 | 8);
+}
+#else
+#define validate_spi(stm_spi, which, len) do { (void) (which); (void) (len); } while (0)
+#endif
+
+static void
+ao_spi_run(uint8_t id, uint8_t which, uint16_t len)
+{
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
+       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
+
+       validate_spi(stm_spi, which, len);
+
+       stm_spi->cr2 = SPI_CR2_DMA;
+
+       ao_dma_start(miso_dma_index);
+       ao_dma_start(mosi_dma_index);
+
+       ao_arch_critical(
+               while (!ao_dma_done[miso_dma_index])
+                       ao_sleep(&ao_dma_done[miso_dma_index]);
+               );
+
+       while ((stm_spi->sr & (1 << STM_SPI_SR_TXE)) == 0);
+       while (stm_spi->sr & (1 << STM_SPI_SR_BSY));
+
+       validate_spi(stm_spi, which+1, len);
+
+       stm_spi->cr2 = 0;
+
+       ao_dma_done_transfer(mosi_dma_index);
+       ao_dma_done_transfer(miso_dma_index);
+}
+
 void
 ao_spi_send(const void *block, uint16_t len, uint8_t spi_index)
 {
-       struct stm_spi *stm_spi = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].stm_spi;
-       uint8_t mosi_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].mosi_dma_index;
-       uint8_t miso_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].miso_dma_index;
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
+       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        /* Set up the transmit DMA to deliver data */
        ao_dma_set_transfer(mosi_dma_index,
@@ -84,9 +157,6 @@ ao_spi_send(const void *block, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR) |
                            (0 << STM_DMA_CCR_TCIE));
 
-       /* Clear RXNE */
-       (void) stm_spi->dr;
-
        /* Set up the receive DMA -- when this is done, we know the SPI unit
         * is idle. Without this, we'd have to poll waiting for the BSY bit to
         * be cleared
@@ -105,24 +175,16 @@ ao_spi_send(const void *block, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR) |
                            (1 << STM_DMA_CCR_TCIE));
 
-       stm_spi->cr2 = SPI_CR2_DMA;
-
-       ao_dma_start(miso_dma_index);
-       ao_dma_start(mosi_dma_index);
-       ao_arch_critical(
-               while (!ao_dma_done[miso_dma_index])
-                       ao_sleep(&ao_dma_done[miso_dma_index]);
-               );
-       ao_dma_done_transfer(mosi_dma_index);
-       ao_dma_done_transfer(miso_dma_index);
+       ao_spi_run(id, 1, len);
 }
 
 void
 ao_spi_send_fixed(uint8_t value, uint16_t len, uint8_t spi_index)
 {
-       struct stm_spi *stm_spi = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].stm_spi;
-       uint8_t mosi_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].mosi_dma_index;
-       uint8_t miso_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].miso_dma_index;
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
+       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        /* Set up the transmit DMA to deliver data */
        ao_dma_set_transfer(mosi_dma_index,
@@ -139,9 +201,6 @@ ao_spi_send_fixed(uint8_t value, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR) |
                            (0 << STM_DMA_CCR_TCIE));
 
-       /* Clear RXNE */
-       (void) stm_spi->dr;
-
        /* Set up the receive DMA -- when this is done, we know the SPI unit
         * is idle. Without this, we'd have to poll waiting for the BSY bit to
         * be cleared
@@ -160,40 +219,67 @@ ao_spi_send_fixed(uint8_t value, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR) |
                            (1 << STM_DMA_CCR_TCIE));
 
-       stm_spi->cr2 = SPI_CR2_DMA;
-       ao_dma_start(miso_dma_index);
-       ao_dma_start(mosi_dma_index);
-       ao_arch_critical(
-               while (!ao_dma_done[miso_dma_index])
-                       ao_sleep(&ao_dma_done[miso_dma_index]);
-               );
-       ao_dma_done_transfer(mosi_dma_index);
-       ao_dma_done_transfer(miso_dma_index);
+       ao_spi_run(id, 3, len);
 }
 
 void
-ao_spi_send_sync(void *block, uint16_t len, uint8_t spi_index)
+ao_spi_start_bytes(uint8_t spi_index)
 {
-       uint8_t         *b = block;
-       struct stm_spi  *stm_spi = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].stm_spi;
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
 
        stm_spi->cr2 = SPI_CR2_SYNC;
+       validate_spi(stm_spi, 5, 0xffff);
+}
 
-       /* Clear RXNE */
+void
+ao_spi_stop_bytes(uint8_t spi_index)
+{
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+
+       while ((stm_spi->sr & (1 << STM_SPI_SR_TXE)) == 0)
+               ;
+       while (stm_spi->sr & (1 << STM_SPI_SR_BSY))
+               ;
+       /* Clear the OVR flag */
        (void) stm_spi->dr;
+       (void) stm_spi->sr;
+       validate_spi(stm_spi, 6, 0xffff);
+       stm_spi->cr2 = 0;
+}
 
+void
+ao_spi_send_sync(const void *block, uint16_t len, uint8_t spi_index)
+{
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       const uint8_t   *b = block;
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+
+       stm_spi->cr2 = SPI_CR2_SYNC;
+
+       validate_spi(stm_spi, 7, len);
        while (len--) {
                while (!(stm_spi->sr & (1 << STM_SPI_SR_TXE)));
                stm_spi->dr = *b++;
        }
+       while ((stm_spi->sr & (1 << STM_SPI_SR_TXE)) == 0)
+               ;
+       while (stm_spi->sr & (1 << STM_SPI_SR_BSY))
+               ;
+       /* Clear the OVR flag */
+       (void) stm_spi->dr;
+       (void) stm_spi->sr;
+       validate_spi(stm_spi, 8, len);
 }
 
 void
 ao_spi_recv(void *block, uint16_t len, uint8_t spi_index)
 {
-       struct stm_spi *stm_spi = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].stm_spi;
-       uint8_t mosi_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].mosi_dma_index;
-       uint8_t miso_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].miso_dma_index;
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
+       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        spi_dev_null = 0xff;
 
@@ -212,9 +298,6 @@ ao_spi_recv(void *block, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR) |
                            (0 << STM_DMA_CCR_TCIE));
 
-       /* Clear RXNE */
-       (void) stm_spi->dr;
-
        /* Set up the receive DMA to capture data */
        ao_dma_set_transfer(miso_dma_index,
                            &stm_spi->dr,
@@ -230,26 +313,16 @@ ao_spi_recv(void *block, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR) |
                            (1 << STM_DMA_CCR_TCIE));
 
-       stm_spi->cr2 = SPI_CR2_DMA;
-       ao_dma_start(miso_dma_index);
-       ao_dma_start(mosi_dma_index);
-
-       /* Wait until the SPI unit is done */
-       ao_arch_critical(
-               while (!ao_dma_done[miso_dma_index])
-                       ao_sleep(&ao_dma_done[miso_dma_index]);
-               );
-
-       ao_dma_done_transfer(mosi_dma_index);
-       ao_dma_done_transfer(miso_dma_index);
+       ao_spi_run(id, 9, len);
 }
 
 void
 ao_spi_duplex(void *out, void *in, uint16_t len, uint8_t spi_index)
 {
-       struct stm_spi *stm_spi = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].stm_spi;
-       uint8_t mosi_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].mosi_dma_index;
-       uint8_t miso_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].miso_dma_index;
+       uint8_t         id = AO_SPI_INDEX(spi_index);
+       struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
+       uint8_t         mosi_dma_index = ao_spi_stm_info[id].mosi_dma_index;
+       uint8_t         miso_dma_index = ao_spi_stm_info[id].miso_dma_index;
 
        /* Set up transmit DMA to send data */
        ao_dma_set_transfer(mosi_dma_index,
@@ -266,9 +339,6 @@ ao_spi_duplex(void *out, void *in, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_MEM_TO_PER << STM_DMA_CCR_DIR) |
                            (0 << STM_DMA_CCR_TCIE));
 
-       /* Clear RXNE */
-       (void) stm_spi->dr;
-
        /* Set up the receive DMA to capture data */
        ao_dma_set_transfer(miso_dma_index,
                            &stm_spi->dr,
@@ -284,18 +354,7 @@ ao_spi_duplex(void *out, void *in, uint16_t len, uint8_t spi_index)
                            (STM_DMA_CCR_DIR_PER_TO_MEM << STM_DMA_CCR_DIR) |
                            (1 << STM_DMA_CCR_TCIE));
 
-       stm_spi->cr2 = SPI_CR2_DMA;
-       ao_dma_start(miso_dma_index);
-       ao_dma_start(mosi_dma_index);
-
-       /* Wait until the SPI unit is done */
-       ao_arch_critical(
-               while (!ao_dma_done[miso_dma_index])
-                       ao_sleep(&ao_dma_done[miso_dma_index]);
-               );
-
-       ao_dma_done_transfer(mosi_dma_index);
-       ao_dma_done_transfer(miso_dma_index);
+       ao_spi_run(id, 11, len);
 }
 
 static void
@@ -303,32 +362,24 @@ ao_spi_disable_index(uint8_t spi_index)
 {
        /* Disable current config
         */
-       switch (AO_SPI_INDEX(spi_index)) {
-       case STM_SPI_INDEX(1):
-               switch (spi_index) {
-               case AO_SPI_1_PA5_PA6_PA7:
-                       stm_gpio_set(&stm_gpioa, 5, 1);
-                       stm_moder_set(&stm_gpioa, 5, STM_MODER_OUTPUT);
-                       stm_moder_set(&stm_gpioa, 6, STM_MODER_INPUT);
-                       stm_moder_set(&stm_gpioa, 7, STM_MODER_OUTPUT);
-                       break;
-               case AO_SPI_1_PB3_PB4_PB5:
-                       stm_gpio_set(&stm_gpiob, 3, 1);
-                       stm_moder_set(&stm_gpiob, 3, STM_MODER_OUTPUT);
-                       stm_moder_set(&stm_gpiob, 4, STM_MODER_INPUT);
-                       stm_moder_set(&stm_gpiob, 5, STM_MODER_OUTPUT);
-                       break;
-               }
+       switch (spi_index) {
+       case AO_SPI_1_PA5_PA6_PA7:
+               stm_gpio_set(&stm_gpioa, 5, 1);
+               stm_moder_set(&stm_gpioa, 5, STM_MODER_OUTPUT);
+               stm_moder_set(&stm_gpioa, 6, STM_MODER_INPUT);
+               stm_moder_set(&stm_gpioa, 7, STM_MODER_OUTPUT);
                break;
-       case STM_SPI_INDEX(2):
-               switch (spi_index) {
-               case AO_SPI_2_PB13_PB14_PB15:
-                       stm_gpio_set(&stm_gpiob, 13, 1);
-                       stm_moder_set(&stm_gpiob, 13, STM_MODER_OUTPUT);
-                       stm_moder_set(&stm_gpiob, 14, STM_MODER_INPUT);
-                       stm_moder_set(&stm_gpiob, 15, STM_MODER_OUTPUT);
-                       break;
-               }
+       case AO_SPI_1_PB3_PB4_PB5:
+               stm_gpio_set(&stm_gpiob, 3, 1);
+               stm_moder_set(&stm_gpiob, 3, STM_MODER_OUTPUT);
+               stm_moder_set(&stm_gpiob, 4, STM_MODER_INPUT);
+               stm_moder_set(&stm_gpiob, 5, STM_MODER_OUTPUT);
+               break;
+       case AO_SPI_2_PB13_PB14_PB15:
+               stm_gpio_set(&stm_gpiob, 13, 1);
+               stm_moder_set(&stm_gpiob, 13, STM_MODER_OUTPUT);
+               stm_moder_set(&stm_gpiob, 14, STM_MODER_INPUT);
+               stm_moder_set(&stm_gpiob, 15, STM_MODER_OUTPUT);
                break;
        }
 }
@@ -336,29 +387,21 @@ ao_spi_disable_index(uint8_t spi_index)
 static void
 ao_spi_enable_index(uint8_t spi_index)
 {
-       switch (AO_SPI_INDEX(spi_index)) {
-       case STM_SPI_INDEX(1):
-               switch (spi_index) {
-               case AO_SPI_1_PA5_PA6_PA7:
-                       stm_afr_set(&stm_gpioa, 5, STM_AFR_AF0);
-                       stm_afr_set(&stm_gpioa, 6, STM_AFR_AF0);
-                       stm_afr_set(&stm_gpioa, 7, STM_AFR_AF0);
-                       break;
-               case AO_SPI_1_PB3_PB4_PB5:
-                       stm_afr_set(&stm_gpiob, 3, STM_AFR_AF0);
-                       stm_afr_set(&stm_gpiob, 4, STM_AFR_AF0);
-                       stm_afr_set(&stm_gpiob, 5, STM_AFR_AF0);
-                       break;
-               }
+       switch (spi_index) {
+       case AO_SPI_1_PA5_PA6_PA7:
+               stm_afr_set(&stm_gpioa, 5, STM_AFR_AF0);
+               stm_afr_set(&stm_gpioa, 6, STM_AFR_AF0);
+               stm_afr_set(&stm_gpioa, 7, STM_AFR_AF0);
                break;
-       case STM_SPI_INDEX(2):
-               switch (spi_index) {
-               case AO_SPI_2_PB13_PB14_PB15:
-                       stm_afr_set(&stm_gpiob, 13, STM_AFR_AF0);
-                       stm_afr_set(&stm_gpiob, 14, STM_AFR_AF0);
-                       stm_afr_set(&stm_gpiob, 15, STM_AFR_AF0);
-                       break;
-               }
+       case AO_SPI_1_PB3_PB4_PB5:
+               stm_afr_set(&stm_gpiob, 3, STM_AFR_AF0);
+               stm_afr_set(&stm_gpiob, 4, STM_AFR_AF0);
+               stm_afr_set(&stm_gpiob, 5, STM_AFR_AF0);
+               break;
+       case AO_SPI_2_PB13_PB14_PB15:
+               stm_afr_set(&stm_gpiob, 13, STM_AFR_AF0);
+               stm_afr_set(&stm_gpiob, 14, STM_AFR_AF0);
+               stm_afr_set(&stm_gpiob, 15, STM_AFR_AF0);
                break;
        }
 }
@@ -369,6 +412,20 @@ ao_spi_config(uint8_t spi_index, uint32_t speed)
        uint8_t         id = AO_SPI_INDEX(spi_index);
        struct stm_spi  *stm_spi = ao_spi_stm_info[id].stm_spi;
 
+       if (spi_index != ao_spi_index[id]) {
+
+               /* Disable old config
+                */
+               ao_spi_disable_index(ao_spi_index[id]);
+
+               /* Enable new config
+                */
+               ao_spi_enable_index(spi_index);
+
+               /* Remember current config
+                */
+               ao_spi_index[id] = spi_index;
+       }
        stm_spi->cr2 = SPI_CR2;
        stm_spi->cr1 = ((0 << STM_SPI_CR1_BIDIMODE) |                   /* Three wire mode */
                        (0 << STM_SPI_CR1_BIDIOE) |
@@ -384,21 +441,6 @@ ao_spi_config(uint8_t spi_index, uint32_t speed)
                        (1 << STM_SPI_CR1_MSTR) |
                        (0 << STM_SPI_CR1_CPOL) |                       /* Format 0 */
                        (0 << STM_SPI_CR1_CPHA));
-
-       if (spi_index != ao_spi_index[id]) {
-
-               /* Disable old config
-                */
-               ao_spi_disable_index(ao_spi_index[id]);
-
-               /* Enable new config
-                */
-               ao_spi_enable_index(spi_index);
-
-               /* Remember current config
-                */
-               ao_spi_index[id] = spi_index;
-       }
 }
 
 uint8_t
@@ -439,10 +481,57 @@ ao_spi_channel_init(uint8_t spi_index)
        ao_spi_disable_index(spi_index);
 
        stm_spi->cr1 = 0;
-       (void) stm_spi->sr;
        stm_spi->cr2 = SPI_CR2_SYNC;
+
+       /* Clear any pending data and error flags */
+       (void) stm_spi->dr;
+       (void) stm_spi->sr;
 }
 
+#if DEBUG
+void
+ao_spi_dump_cmd(void)
+{
+       int s;
+
+       for (s = 0; s < 64; s++) {
+               int i = (spi_task_index + s) & 63;
+               if (spi_tasks[i].which) {
+                       int t;
+                       const char *name = "(none)";
+                       for (t = 0; t < ao_num_tasks; t++)
+                               if (ao_tasks[t]->task_id == spi_tasks[i].task) {
+                                       name = ao_tasks[t]->name;
+                                       break;
+                               }
+                       printf("%2d: %5d task %2d which %2d len %5d %s\n",
+                              s,
+                              spi_tasks[i].tick,
+                              spi_tasks[i].task,
+                              spi_tasks[i].which,
+                              spi_tasks[i].len,
+                              name);
+               }
+       }
+       for (s = 0; s < STM_NUM_SPI; s++) {
+               struct stm_spi *spi = ao_spi_stm_info[s].stm_spi;
+
+               printf("%1d: mutex %2d index %3d miso dma %3d mosi dma %3d",
+                      s, ao_spi_mutex[s], ao_spi_index[s],
+                      ao_spi_stm_info[s].miso_dma_index,
+                      ao_spi_stm_info[s].mosi_dma_index);
+               printf(" cr1 %04x cr2 %02x sr %03x\n",
+                      spi->cr1, spi->cr2, spi->sr);
+       }
+
+}
+
+static const struct ao_cmds ao_spi_cmds[] = {
+       { ao_spi_dump_cmd,      "S\0Dump SPI status" },
+       { 0, NULL }
+};
+#endif
+
 void
 ao_spi_init(void)
 {
@@ -475,4 +564,7 @@ ao_spi_init(void)
        ao_spi_index[1] = AO_SPI_CONFIG_NONE;
        ao_spi_channel_init(STM_SPI_INDEX(2));
 #endif
+#if DEBUG
+       ao_cmd_register(&ao_spi_cmds[0]);
+#endif
 }
index e5bf04a3ccb8eecfe56593ad446b177d57fb2af6..5c05e4f187c09017876b1dfd476ed6a9259e7e9d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -175,13 +176,12 @@ ao_clock_normal_start(void)
        while (!(stm_rcc.cr & (1 << STM_RCC_CR_HSERDY)))
                asm("nop");
 
-#ifdef STM_PLLSRC
        /* Disable the PLL */
        stm_rcc.cr &= ~(1 << STM_RCC_CR_PLLON);
        while (stm_rcc.cr & (1 << STM_RCC_CR_PLLRDY))
                asm("nop");
 
-       /* PLLVCO to 48MHz (for USB) -> PLLMUL = 3 */
+       /* Set multiplier */
        cfgr = stm_rcc.cfgr;
        cfgr &= ~(STM_RCC_CFGR_PLLMUL_MASK << STM_RCC_CFGR_PLLMUL);
        cfgr |= (AO_RCC_CFGR_PLLMUL << STM_RCC_CFGR_PLLMUL);
@@ -191,8 +191,8 @@ ao_clock_normal_start(void)
        cfgr |= (STM_RCC_CFGR_PLLSRC_TARGET_CLOCK  << STM_RCC_CFGR_PLLSRC);
        stm_rcc.cfgr = cfgr;
 
-       /* Disable pre divider */
-       stm_rcc.cfgr2 = (STM_RCC_CFGR2_PREDIV_1 << STM_RCC_CFGR2_PREDIV);
+       /* Set pre divider */
+       stm_rcc.cfgr2 = (AO_RCC_CFGR2_PLLDIV << STM_RCC_CFGR2_PREDIV);
 
        /* Enable the PLL and wait for it */
        stm_rcc.cr |= (1 << STM_RCC_CR_PLLON);
@@ -201,9 +201,6 @@ ao_clock_normal_start(void)
 
 #endif
 
-#endif
-
-
 #if AO_HSI48
 #define STM_RCC_CFGR_SWS_TARGET_CLOCK          STM_RCC_CFGR_SWS_HSI48
 #define STM_RCC_CFGR_SW_TARGET_CLOCK           STM_RCC_CFGR_SW_HSI48
@@ -225,6 +222,8 @@ ao_clock_normal_start(void)
 #define STM_PLLSRC                             STM_HSI
 #define STM_RCC_CFGR_PLLSRC_TARGET_CLOCK       0
 #endif
+
+
 }
 
 static void
@@ -302,14 +301,34 @@ ao_clock_init(void)
        /* Clear reset flags */
        stm_rcc.csr |= (1 << STM_RCC_CSR_RMVF);
 
+#ifdef AO_MCO_PORT
+       cfgr = stm_rcc.cfgr;
+
+       /* Send PLL clock to MCO */
+       cfgr &= ~(STM_RCC_CFGR_MCO_MASK << STM_RCC_CFGR_MCO);
+       cfgr |= (STM_RCC_CFGR_MCO_PLLCLK << STM_RCC_CFGR_MCO);
+
+       /* Divide by 1 */
+       cfgr &= ~(STM_RCC_CFGR_MCOPRE_DIV_MASK << STM_RCC_CFGR_MCOPRE);
+       cfgr |= (STM_RCC_CFGR_MCOPRE_DIV_1 << STM_RCC_CFGR_MCOPRE);
+
+       /* Don't divide PLL */
+       cfgr |= (1 << STM_RCC_CFGR_PLL_NODIV);
+
+       stm_rcc.cfgr = cfgr;
+
+       ao_enable_port(AO_MCO_PORT);
+       stm_ospeedr_set(AO_MCO_PORT, AO_MCO_PIN, STM_OSPEEDR_HIGH);
+       stm_afr_set(AO_MCO_PORT, AO_MCO_PIN, AO_MCO_AF);
+#endif
+
 #if DEBUG_THE_CLOCK
        /* Output SYSCLK on PA8 for measurments */
 
        stm_rcc.ahbenr |= (1 << STM_RCC_AHBENR_GPIOAEN);
 
        stm_afr_set(&stm_gpioa, 8, STM_AFR_AF0);
-       stm_moder_set(&stm_gpioa, 8, STM_MODER_ALTERNATE);
-       stm_ospeedr_set(&stm_gpioa, 8, STM_OSPEEDR_40MHz);
+       stm_ospeedr_set(&stm_gpioa, 8, STM_OSPEEDR_HIGH);
 
        stm_rcc.cfgr |= (STM_RCC_CFGR_MCOPRE_DIV_1 << STM_RCC_CFGR_MCOPRE);
        stm_rcc.cfgr |= (STM_RCC_CFGR_MCOSEL_HSE << STM_RCC_CFGR_MCOSEL);
index fb3d8c85af6c56da3ce610f17f74c67a29b4298c..cbedb9962231fa972256c33f0ee18bedef92aba2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 33eb9c88ced11d2a77225a2fd247a5ff5db4efe5..054200e0c7ce03d2d7f36f2ca6652ff4caf1ffec 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -312,6 +313,15 @@ extern struct stm_rcc stm_rcc;
 
 #define STM_RCC_CFGR_MCO       (24)
 # define STM_RCC_CFGR_MCO_DISABLE      0
+# define STM_RCC_CFGR_MCO_RC           1
+# define STM_RCC_CFGR_MCO_LSI          2
+# define STM_RCC_CFGR_MCO_LSE          3
+# define STM_RCC_CFGR_MCO_SYSCLK       4
+# define STM_RCC_CFGR_MCO_HSI          5
+# define STM_RCC_CFGR_MCO_HSE          6
+# define STM_RCC_CFGR_MCO_PLLCLK       7
+# define STM_RCC_CFGR_MCO_HSI48                8
+# define STM_RCC_CFGR_MCO_MASK         (0xf)
 
 #define STM_RCC_CFGR_PLLMUL    (18)
 #define  STM_RCC_CFGR_PLLMUL_2         0
@@ -1344,6 +1354,290 @@ extern struct stm_i2c stm_i2c1, stm_i2c2;
 #define STM_I2C_CCR_CCR                0
 #define  STM_I2C_CCR_MASK      0x7ff
 
+struct stm_tim1 {
+       vuint32_t       cr1;
+       vuint32_t       cr2;
+       vuint32_t       smcr;
+       vuint32_t       dier;
+
+       vuint32_t       sr;
+       vuint32_t       egr;
+       vuint32_t       ccmr1;
+       vuint32_t       ccmr2;
+
+       vuint32_t       ccer;
+       vuint32_t       cnt;
+       vuint32_t       psc;
+       vuint32_t       arr;
+
+       vuint32_t       rcr;
+       vuint32_t       ccr1;
+       vuint32_t       ccr2;
+       vuint32_t       ccr3;
+
+       vuint32_t       ccr4;
+       vuint32_t       bdtr;
+       vuint32_t       dcr;
+       vuint32_t       dmar;
+};
+
+#define STM_TIM1_CR1_CKD       8
+#define  STM_TIM1_CR1_CKD_1            0
+#define  STM_TIM1_CR1_CKD_2            1
+#define  STM_TIM1_CR1_CKD_4            2
+
+#define STM_TIM1_CR1_ARPE      7
+
+#define STM_TIM1_CR1_CMS       5
+#define  STM_TIM1_CR1_CMS_EDGE         0
+#define  STM_TIM1_CR1_CMS_CENTER_1     1
+#define  STM_TIM1_CR1_CMS_CENTER_2     2
+#define  STM_TIM1_CR1_CMS_CENTER_3     3
+
+#define STM_TIM1_CR1_DIR       4
+#define  STM_TIM1_CR1_DIR_UP           0
+#define  STM_TIM1_CR1_DIR_DOWn         1
+#define STM_TIM1_CR1_OPM       3
+#define STM_TIM1_CR1_URS       2
+#define STM_TIM1_CR1_UDIS      1
+#define STM_TIM1_CR1_CEN       0
+
+#define STM_TIM1_CR2_OIS4      14
+#define STM_TIM1_CR2_OIS3N     13
+#define STM_TIM1_CR2_OIS3      12
+#define STM_TIM1_CR2_OIS2N     11
+#define STM_TIM1_CR2_OIS2      10
+#define STM_TIM1_CR2_OIS1N     9
+#define STM_TIM1_CR2_OSI1      8
+#define STM_TIM1_CR2_TI1S      7
+#define STM_TIM1_CR2_MMS       4
+#define  STM_TIM1_CR2_MMS_RESET                        0
+#define  STM_TIM1_CR2_MMS_ENABLE               1
+#define  STM_TIM1_CR2_MMS_UPDATE               2
+#define  STM_TIM1_CR2_MMS_COMPARE_PULSE                3
+#define  STM_TIM1_CR2_MMS_COMPARE_OC1REF       4
+#define  STM_TIM1_CR2_MMS_COMPARE_OC2REF       5
+#define  STM_TIM1_CR2_MMS_COMPARE_OC3REF       6
+#define  STM_TIM1_CR2_MMS_COMPARE_OC4REF       7
+#define STM_TIM1_CR2_CCDS      3
+#define STM_TIM1_CR2_CCUS      2
+#define STM_TIM1_CR2_CCPC      0
+
+#define STM_TIM1_SMCR_ETP      15
+#define STM_TIM1_SMCR_ECE      14
+#define STM_TIM1_SMCR_ETPS     12
+#define  STM_TIM1_SMCR_ETPS_OFF                0
+#define  STM_TIM1_SMCR_ETPS_DIV_2      1
+#define  STM_TIM1_SMCR_ETPS_DIV_4      2
+#define  STM_TIM1_SMCR_ETPS_DIV_8      3
+
+#define STM_TIM1_SMCR_ETF      8
+#define  STM_TIM1_SMCR_ETF_NONE                0
+#define  STM_TIM1_SMCR_ETF_DIV_1_N_2   1
+#define  STM_TIM1_SMCR_ETF_DIV_1_N_4   2
+#define  STM_TIM1_SMCR_ETF_DIV_1_N_8   3
+#define  STM_TIM1_SMCR_ETF_DIV_2_N_6   4
+#define  STM_TIM1_SMCR_ETF_DIV_2_N_8   5
+#define  STM_TIM1_SMCR_ETF_DIV_4_N_6   6
+#define  STM_TIM1_SMCR_ETF_DIV_4_N_8   7
+#define  STM_TIM1_SMCR_ETF_DIV_8_N_6   8
+#define  STM_TIM1_SMCR_ETF_DIV_8_N_8   9
+#define  STM_TIM1_SMCR_ETF_DIV_16_N_5  10
+#define  STM_TIM1_SMCR_ETF_DIV_16_N_6  11
+#define  STM_TIM1_SMCR_ETF_DIV_16_N_8  12
+#define  STM_TIM1_SMCR_ETF_DIV_32_N_5  13
+#define  STM_TIM1_SMCR_ETF_DIV_32_N_6  14
+#define  STM_TIM1_SMCR_ETF_DIV_32_N_8  15
+
+#define STM_TIM1_SMCR_MSM      7
+#define STM_TIM1_SMCR_TS       4
+#define  STM_TIM1_SMCR_TS_ITR0         0
+#define  STM_TIM1_SMCR_TS_ITR1         1
+#define  STM_TIM1_SMCR_TS_ITR2         2
+#define  STM_TIM1_SMCR_TS_ITR3         3
+#define  STM_TIM1_SMCR_TS_TI1F_ED      4
+#define  STM_TIM1_SMCR_TS_TI1FP1       5
+#define  STM_TIM1_SMCR_TS_TI2FP2       6
+#define  STM_TIM1_SMCR_TS_ETRF         7
+
+#define STM_TIM1_SMCR_OCCS     3
+#define STM_TIM1_SMCR_SMS      0
+#define  STM_TIM1_SMCR_SMS_DISABLE     0
+#define  STM_TIM1_SMCR_SMS_ENCODER_1   1
+#define  STM_TIM1_SMCR_SMS_ENCODER_2   2
+#define  STM_TIM1_SMCR_SMS_ENCODER_3   3
+#define  STM_TIM1_SMCR_SMS_RESET       4
+#define  STM_TIM1_SMCR_SMS_GATED       5
+#define  STM_TIM1_SMCR_SMS_TRIGGER     6
+#define  STM_TIM1_SMCR_SMS_EXTERNAL    7
+
+#define STM_TIM1_DIER_TDE      14
+#define STM_TIM1_DIER_COMDE    13
+#define STM_TIM1_DIER_CC4DE    12
+#define STM_TIM1_DIER_CC3DE    11
+#define STM_TIM1_DIER_CC2DE    10
+#define STM_TIM1_DIER_CC1DE    9
+#define STM_TIM1_DIER_UDE      8
+#define STM_TIM1_DIER_BIE      7
+#define STM_TIM1_DIER_TIE      6
+#define STM_TIM1_DIER_COMIE    5
+#define STM_TIM1_DIER_CC4IE    4
+#define STM_TIM1_DIER_CC3IE    3
+#define STM_TIM1_DIER_CC2IE    2
+#define STM_TIM1_DIER_CC1IE    1
+#define STM_TIM1_DIER_UIE      0
+
+#define STM_TIM1_SR_CC4OF      12
+#define STM_TIM1_SR_CC3OF      11
+#define STM_TIM1_SR_CC2OF      10
+#define STM_TIM1_SR_CC1OF      9
+#define STM_TIM1_SR_BIF                7
+#define STM_TIM1_SR_TIF                6
+#define STM_TIM1_SR_COMIF      5
+#define STM_TIM1_SR_CC4IF      4
+#define STM_TIM1_SR_CC3IF      3
+#define STM_TIM1_SR_CC2IF      2
+#define STM_TIM1_SR_CC1IF      1
+#define STM_TIM1_SR_UIF                0
+
+#define STM_TIM1_EGR_BG                7
+#define STM_TIM1_EGR_TG                6
+#define STM_TIM1_EGR_COMG      5
+#define STM_TIM1_EGR_CC4G      4
+#define STM_TIM1_EGR_CC3G      3
+#define STM_TIM1_EGR_CC2G      2
+#define STM_TIM1_EGR_CC1G      1
+#define STM_TIM1_EGR_UG                0
+
+#define STM_TIM1_CCMR1_OC2CE   15
+#define STM_TIM1_CCMR1_OC2M    12
+#define STM_TIM1_CCMR1_OC2PE   11
+#define STM_TIM1_CCMR1_OC2FE   10
+#define STM_TIM1_CCMR1_CC2S    8
+#define STM_TIM1_CCMR1_OC1CE   7
+#define STM_TIM1_CCMR1_OC1M    4
+#define  STM_TIM1_CCMR_OCM_FROZEN              0
+#define  STM_TIM1_CCMR_OCM_1_HIGH_MATCH                1
+#define  STM_TIM1_CCMR_OCM_1_LOW_MATCH         2
+#define  STM_TIM1_CCMR_OCM_TOGGLE              3
+#define  STM_TIM1_CCMR_OCM_FORCE_LOW           4
+#define  STM_TIM1_CCMR_OCM_FORCE_HIGH          5
+#define  STM_TIM1_CCMR_OCM_PWM_MODE_1          6
+#define  STM_TIM1_CCMR_OCM_PWM_MODE_2          7
+
+#define STM_TIM1_CCMR1_OC1PE   3
+#define STM_TIM1_CCMR1_OC1FE   2
+#define STM_TIM1_CCMR1_CC1S    0
+#define  STM_TIM1_CCMR_CCS_OUTPUT      0
+#define  STM_TIM1_CCMR_CCS_INPUT_TI1   1
+#define  STM_TIM1_CCMR_CCS_INPUT_TI2   2
+#define  STM_TIM1_CCMR_CCS_INPUT_TRC   3
+
+#define STM_TIM1_CCMR1_IC2F    12
+#define STM_TIM1_CCMR1_IC2PSC  10
+#define STM_TIM1_CCMR1_CC2S    8
+#define STM_TIM1_CCMR1_IC1F    4
+#define  STM_TIM1_CCMR1_IC1F_NONE      0
+#define  STM_TIM1_CCMR1_IC1F_DIV_1_N_2 1
+#define  STM_TIM1_CCMR1_IC1F_DIV_1_N_4 2
+#define  STM_TIM1_CCMR1_IC1F_DIV_1_N_8 3
+#define  STM_TIM1_CCMR1_IC1F_DIV_2_N_6 4
+#define  STM_TIM1_CCMR1_IC1F_DIV_2_N_8 5
+#define  STM_TIM1_CCMR1_IC1F_DIV_4_N_6 6
+#define  STM_TIM1_CCMR1_IC1F_DIV_4_N_8 7
+#define  STM_TIM1_CCMR1_IC1F_DIV_8_N_6 8
+#define  STM_TIM1_CCMR1_IC1F_DIV_8_N_8 9
+#define  STM_TIM1_CCMR1_IC1F_DIV_16_N_5        10
+#define  STM_TIM1_CCMR1_IC1F_DIV_16_N_6        11
+#define  STM_TIM1_CCMR1_IC1F_DIV_16_N_8        12
+#define  STM_TIM1_CCMR1_IC1F_DIV_32_N_5        13
+#define  STM_TIM1_CCMR1_IC1F_DIV_32_N_6        14
+#define  STM_TIM1_CCMR1_IC1F_DIV_32_N_8        15
+
+#define STM_TIM1_CCMR1_IC1PSC  2
+#define  STM_TIM1_CCMR1_IC1PSC_NONE    0
+#define  STM_TIM1_CCMR1_IC1PSC_2       1
+#define  STM_TIM1_CCMR1_IC1PSC_4       2
+#define  STM_TIM1_CCMR1_IC1PSC_8       3
+
+#define STM_TIM1_CCMR1_CC1S    0
+#define  STM_TIM1_CCMR1_CC1S_OUTPUT    0
+#define  STM_TIM1_CCMR1_CC1S_TI1       1
+#define  STM_TIM1_CCMR1_CC1S_TI2       2
+#define  STM_TIM1_CCMR1_CC1S_TRC       3
+
+#define STM_TIM1_CCMR2_OC4CE   15
+#define STM_TIM1_CCMR2_OC4M    12
+#define STM_TIM1_CCMR2_OC4PE   11
+#define STM_TIM1_CCMR2_OC4FE   10
+#define STM_TIM1_CCMR2_CC4S    8
+#define  STM_TIM1_CCMR2_CCS_OUTPUT     0
+#define  STM_TIM1_CCMR2_CCS_INPUT_TI3  1
+#define  STM_TIM1_CCMR2_CCS_INPUT_TI4  2
+#define  STM_TIM1_CCMR2_CCS_INPUT_TRC  3
+#define STM_TIM1_CCMR2_OC3CE   7
+#define STM_TIM1_CCMR2_OC3M    4
+#define STM_TIM1_CCMR2_OC3PE   3
+#define STM_TIM1_CCMR2_OC3FE   2
+#define STM_TIM1_CCMR2_CC3S    0
+
+#define STM_TIM1_CCMR2_IC4F    12
+#define STM_TIM1_CCMR2_IC2PSC  10
+#define STM_TIM1_CCMR2_CC4S    8
+#define STM_TIM1_CCMR2_IC3F    4
+#define  STM_TIM1_CCMR2_IC1F_NONE      0
+#define  STM_TIM1_CCMR2_IC1F_DIV_1_N_2 1
+#define  STM_TIM1_CCMR2_IC1F_DIV_1_N_4 2
+#define  STM_TIM1_CCMR2_IC1F_DIV_1_N_8 3
+#define  STM_TIM1_CCMR2_IC1F_DIV_2_N_6 4
+#define  STM_TIM1_CCMR2_IC1F_DIV_2_N_8 5
+#define  STM_TIM1_CCMR2_IC1F_DIV_4_N_6 6
+#define  STM_TIM1_CCMR2_IC1F_DIV_4_N_8 7
+#define  STM_TIM1_CCMR2_IC1F_DIV_8_N_6 8
+#define  STM_TIM1_CCMR2_IC1F_DIV_8_N_8 9
+#define  STM_TIM1_CCMR2_IC1F_DIV_16_N_5        10
+#define  STM_TIM1_CCMR2_IC1F_DIV_16_N_6        11
+#define  STM_TIM1_CCMR2_IC1F_DIV_16_N_8        12
+#define  STM_TIM1_CCMR2_IC1F_DIV_32_N_5        13
+#define  STM_TIM1_CCMR2_IC1F_DIV_32_N_6        14
+#define  STM_TIM1_CCMR2_IC1F_DIV_32_N_8        15
+
+#define STM_TIM1_CCER_CC4P     13
+#define STM_TIM1_CCER_CC4E     12
+#define STM_TIM1_CCER_CC3NP    11
+#define STM_TIM1_CCER_CC3NE    10
+#define STM_TIM1_CCER_CC3P     9
+#define STM_TIM1_CCER_CC3E     8
+#define STM_TIM1_CCER_CC2NP    7
+#define STM_TIM1_CCER_CC2NE    6
+#define STM_TIM1_CCER_CC2P     5
+#define STM_TIM1_CCER_CC2E     4
+#define STM_TIM1_CCER_CC1BP    3
+#define STM_TIM1_CCER_CC1NE    2
+#define STM_TIM1_CCER_CC1P     1
+#define STM_TIM1_CCER_CC1E     0
+
+#define STM_TIM1_BDTR_MOE      15
+#define STM_TIM1_BDTR_AOE      14
+#define STM_TIM1_BDTR_BKP      13
+#define STM_TIM1_BDTR_BKE      12
+#define STM_TIM1_BDTR_OSSR     11
+#define STM_TIM1_BDTR_OSSI     10
+#define STM_TIM1_BDTR_LOCK     8
+#define  STM_TIM1_BDTR_LOCK_OFF                0
+#define  STM_TIM1_BDTR_LOCK_LEVEL_1    1
+#define  STM_TIM1_BDTR_LOCK_LEVEL_2    2
+#define  STM_TIM1_BDTR_LOCK_LEVEL_3    3
+
+#define STM_TIM1_BDTR_DTG      0
+
+#define STM_TIM1_DCR_DBL       8
+#define STM_TIM1_DCR_DBA       0
+
+extern struct stm_tim1 stm_tim1;
+
+#define stm_tim1       (*(struct stm_tim1 *)0x40012c00)
+
 struct stm_tim23 {
        vuint32_t       cr1;
        vuint32_t       cr2;
@@ -1518,15 +1812,15 @@ extern struct stm_tim23 stm_tim2, stm_tim3;
 
 #define STM_TIM23_CCMR2_OC4CE  15
 #define STM_TIM23_CCMR2_OC4M   12
-#define  STM_TIM23_CCMR2_OC4M_FROZEN                   0
-#define  STM_TIM23_CCMR2_OC4M_SET_HIGH_ON_MATCH        1
-#define  STM_TIM23_CCMR2_OC4M_SET_LOW_ON_MATCH         2
-#define  STM_TIM23_CCMR2_OC4M_TOGGLE                   3
-#define  STM_TIM23_CCMR2_OC4M_FORCE_LOW                        4
-#define  STM_TIM23_CCMR2_OC4M_FORCE_HIGH               5
-#define  STM_TIM23_CCMR2_OC4M_PWM_MODE_1               6
-#define  STM_TIM23_CCMR2_OC4M_PWM_MODE_2               7
-#define  STM_TIM23_CCMR2_OC4M_MASK                     7
+#define  STM_TIM23_CCMR2_OCM_FROZEN                    0
+#define  STM_TIM23_CCMR2_OCM_SET_HIGH_ON_MATCH 1
+#define  STM_TIM23_CCMR2_OCM_SET_LOW_ON_MATCH          2
+#define  STM_TIM23_CCMR2_OCM_TOGGLE                    3
+#define  STM_TIM23_CCMR2_OCM_FORCE_LOW                 4
+#define  STM_TIM23_CCMR2_OCM_FORCE_HIGH                        5
+#define  STM_TIM23_CCMR2_OCM_PWM_MODE_1                        6
+#define  STM_TIM23_CCMR2_OCM_PWM_MODE_2                        7
+#define  STM_TIM23_CCMR2_OCM_MASK                      7
 #define STM_TIM23_CCMR2_OC4PE  11
 #define STM_TIM23_CCMR2_OC4FE  10
 #define STM_TIM23_CCMR2_CC4S   8
@@ -1538,15 +1832,15 @@ extern struct stm_tim23 stm_tim2, stm_tim3;
 
 #define STM_TIM23_CCMR2_OC3CE  7
 #define STM_TIM23_CCMR2_OC3M   4
-#define  STM_TIM23_CCMR2_OC3M_FROZEN                   0
-#define  STM_TIM23_CCMR2_OC3M_SET_HIGH_ON_MATCH                1
-#define  STM_TIM23_CCMR2_OC3M_SET_LOW_ON_MATCH         2
-#define  STM_TIM23_CCMR2_OC3M_TOGGLE                   3
-#define  STM_TIM23_CCMR2_OC3M_FORCE_LOW                        4
-#define  STM_TIM23_CCMR2_OC3M_FORCE_HIGH               5
+#define  STM_TIM23_CCMR2_OCM_FROZEN                    0
+#define  STM_TIM23_CCMR2_OCM_SET_HIGH_ON_MATCH         1
+#define  STM_TIM23_CCMR2_OCM_SET_LOW_ON_MATCH          2
+#define  STM_TIM23_CCMR2_OCM_TOGGLE                    3
+#define  STM_TIM23_CCMR2_OCM_FORCE_LOW                 4
+#define  STM_TIM23_CCMR2_OCM_FORCE_HIGH                        5
 #define  STM_TIM23_CCMR2_OC3M_PWM_MODE_1               6
-#define  STM_TIM23_CCMR2_OC3M_PWM_MODE_2               7
-#define  STM_TIM23_CCMR2_OC3M_MASK                     7
+#define  STM_TIM23_CCMR2_OCM_PWM_MODE_2                        7
+#define  STM_TIM23_CCMR2_OCM_MASK                      7
 #define STM_TIM23_CCMR2_OC3PE  11
 #define STM_TIM23_CCMR2_OC3FE  2
 #define STM_TIM23_CCMR2_CC3S   0
index 4c23ca88f1bb6c3ab005f11a1128dd435235d8ca..2bf4d59391a7d13824768d6de7007fc521c816ee 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 867e98ab2fe26f9c23400d802b58de926e6be8de..bdbf91d4cafd724c92bacf0d3d9d1d1f3711c68f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b62b55800b9c23abc2c78ecc45e6e30829dd982d..746bb3ee72c55085ab30c76ef76e5bfb1db0741d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9b5068149d41d5165b9cb73c16d4d2eca505b5ae..2432c2729e9d45559d02a4c075c4e549d33b116f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 4181ef35a782d0c0ae58f4810c3a16089853aae9..ca751be357c21292c49cd0fc4710576e4dbd6977 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 935cde7d173b19f12b27095ff419802726939d04..a56adc9251335e6cea3a122e74a73d2bd5e88736 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5058494008c46559f9adcd9f75decc3e2067e108..61cbe9bba62fa2a9ffea5b0844fd52b4a3e1907a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1fe06b1ac42137beca30107ff12f4ef943ba156c..9117863bfa4f86772218c639374de451ea4dc60b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,7 +33,7 @@ main(void)
 
        ao_task_init();
        ao_led_init(LEDS_AVAILABLE);
-       ao_led_on(AO_LED_RED);
+       ao_led_on(LEDS_AVAILABLE);
        ao_timer_init();
 
        ao_spi_init();
@@ -52,7 +53,7 @@ main(void)
 
        ao_config_init();
 
-       ao_led_off(AO_LED_RED);
+       ao_led_off(LEDS_AVAILABLE);
 
        ao_start_scheduler();
        return 0;
index 8711548d27a65050e522175798e3d43d3c2e17d1..139934fa2450d783fe43bf20ac495f09f317a9c4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cff3e5e80e7fd3b71f50d430f67721a6a43806ec..72bea368efd7686f5a504f8d4d19ad7bf61f6fdb 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5ce6b15ba0745ce8686fc581cfb8a8fab2bfee2e..7fd6acdb33aee92646b5cc7bbba6277dc77097ee 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 52a86fcb05d904c6a544d25ad0e6b49c1a57d6ac..effc2322028e23733c806ba545abcb6b6157c837 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 02b93efecd413fdca6ed773a85b96eb69f5a2810..32899af239f0bf272c947d65fddc4bfdf5eb7ae4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -31,7 +32,7 @@ main(void)
 
        ao_task_init();
        ao_led_init(LEDS_AVAILABLE);
-       ao_led_on(AO_LED_RED);
+       ao_led_on(LEDS_AVAILABLE);
        ao_timer_init();
 
        ao_spi_init();
@@ -47,7 +48,7 @@ main(void)
 
        ao_config_init();
 
-       ao_led_off(AO_LED_RED);
+       ao_led_off(LEDS_AVAILABLE);
        ao_start_scheduler();
        return 0;
 }
index aee5be270cd733a714760bae45652ffb3074e35e..f06af5f364edc9f88d7552ec679fc285695c5aa3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1087c7c90d828d1c97fce92b7a8794f9c596fa32..ee0ca7166c3639d45d22c54cc97c212bd7e839d9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index afa09e20e2db339508b183fc0d56430ba255b915..706a23a6b9cef544038d95afc16fb8bb72a8c4b4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 28cc65b92799e9ebd7672621571e8afa7b216648..4faeb65f83ea0ce34fd37dbd4cf4a1bed6be5a70 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f27ca5e8bdb21ed155555f438880c800803ed67c..5187d5b9d63d83d0e125f55a5c4c1b5e4182c03b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fd840f476378ea3dee4e68b079e7b4f8a4fe2b3c..f56061b2d2fa5bac7b93d68e328aa1c535b6dcf3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 38629d86d8775d520b8fa6847613cbed9dbbd927..bdcf3213ddac77c861ef844ce7b9303158784947 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index daa9048d22ab923595a639c9108728abecaaf285..ded45a400f1ba541e26f9d61e3b7988862e3b4c3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0fddc6df3fadce1eb1bac6e8453322b018d0b065..70af5dd198976beac23b3353b3caf7d67ce4b031 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 38629d86d8775d520b8fa6847613cbed9dbbd927..bdcf3213ddac77c861ef844ce7b9303158784947 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index daa9048d22ab923595a639c9108728abecaaf285..ded45a400f1ba541e26f9d61e3b7988862e3b4c3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7ff599562dff637263528423901c38df70aab36f..96e8cfd7d1d5f4d00a2f0d152d5d9cc6d313df5c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index bc37b504fd43da32f247d93a8d2b087891cb950e..eb8ab72d0d6d7f0d040b518c5b856bf8dd7da72f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 564e84de0396eab8ca173550288c0e2e1260b805..a6b5db39dc10011b81c80383c434156a5ae0a449 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d0e4d835b6c7261d860f9b6881487b953176d8aa..9c650cc42441f1b646ab9de036fa887fd46a6202 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dd699ecff6336a27cc0578fdd925f8780186013a..abc80954b5f4039ffbc00939dc48f50a0b97ff07 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 91097a255dea712bb93eda53f8c20aace7f57fa7..56b8fde8f2e433c9c5322a5d36b6cdf15a52ee12 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index eb1033da7dbc34361fb6603ae27fc920a41dfeef..19774f63cc703e514902e38934b890864e1811c7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7a71699b425c91a0b779bd7c63596018adabf58e..ae7e31565f8f18cce026a0b4146c04b295a140d7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 91097a255dea712bb93eda53f8c20aace7f57fa7..56b8fde8f2e433c9c5322a5d36b6cdf15a52ee12 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index cb2195efc928540c2f1455812cfa15a996a5a8f4..649bf5864504e999e0016d1f51a624a75cf99d68 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 253f9702e3904c92560385a6b1964a88632024bf..5721eed539044ab02e897526083dcd439aad533d 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 970f9bd1799d678060a79ff40ae347c262801b8f..231159970267ddf3ede35f893e8929f6fcfbcf46 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 70665ec699622735e1d3b5f665ca1c84d2631871..608f093db836251924f9f145883a12d769ef8943 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index da790b142e9b0990f1566bc30c2e87e157e816ea..b90fca8b7bcdd4b38cadfeaf18bd3878bc868fee 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d9f7c693823da1b8bb168452b9b412d56a16c6cc..7b04d386f8985d6521f9251610322bc66a1a3e9c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6c8ff7e268a916ef50fc3f44d35ace9125591902..72f840c0cd6faa906548b3b07646bae226f64649 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 92095a7c2e71712c80dd8aa33abf49eb7ef5c4bf..d874a19b6646c0ee5be12e85e713c6e261ce4e31 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d9f7c693823da1b8bb168452b9b412d56a16c6cc..7b04d386f8985d6521f9251610322bc66a1a3e9c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6c8ff7e268a916ef50fc3f44d35ace9125591902..72f840c0cd6faa906548b3b07646bae226f64649 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ce797a388e1521cac35397d9541f3d0c59371d3c..714a5c3a02c40d0c5c2fc206bbd33bb01a14a8c8 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
 #define AO_BUTTON_0_PORT       &stm_gpioa
 #define AO_BUTTON_0            0
 
-#define AO_BUTTON_ARM_0                0
+#define AO_BUTTON_BOX          0
 
 #define AO_BUTTON_1_PORT       &stm_gpioa
 #define AO_BUTTON_1            1
 
-#define AO_BUTTON_ARM_1                1
-
-#define AO_BUTTON_ARM_NUM      2
+#define AO_BUTTON_ARM          1
 
 #define AO_BUTTON_2_PORT       &stm_gpioa
 #define AO_BUTTON_2            2
index 318875e3c3bbdebf0295fc39672ee7113952a2b7..b3fcd200745c2c160bc08fbf38ab3951f22ff4b2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 266bff6c798df3732c0afff2dbc8059a6a726e16..ee29a678601e7e17ff78df84c867e7c8f7fd1226 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1815ef547304c695b4538e6b9657a2f476a9fe73..11c4267c9b2eb680bbd882b703dab1d5d097e61b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7b035269bccd5d0d678a4a8ae23bb1682f77aa96..3cfc9b4479aa8a5a9d7e6573a6ad8c4fea96a291 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1af92f1317374040d34533229d9791cdbbf37ac7..2b18f8e58d656224f14306611e83d11d617239e1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 58b4d61a3be9cce6f36d5874a4a0ea6244cadfbc..4decbbf7f64cfd13ef6b0916554a65475bc7b164 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 7b035269bccd5d0d678a4a8ae23bb1682f77aa96..2deb852e1c90e2c5ae2790ba81c2ba4475495730 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +38,7 @@ int
 main(void)
 {
        ao_clock_init();
-       
+
 #if HAS_STACK_GUARD
        ao_mpu_init();
 #endif
@@ -45,7 +46,7 @@ main(void)
        ao_task_init();
        ao_serial_init();
        ao_led_init(LEDS_AVAILABLE);
-       ao_led_on(AO_LED_GREEN);
+       ao_led_on(LEDS_AVAILABLE);
        ao_timer_init();
 
        ao_i2c_init();
@@ -74,7 +75,7 @@ main(void)
 
        ao_eeprom_init();
        ao_storage_init();
-       
+
        ao_flight_init();
        ao_log_init();
        ao_report_init();
@@ -96,7 +97,8 @@ main(void)
 #if HAS_SAMPLE_PROFILE
        ao_sample_profile_init();
 #endif
-       
+
+       ao_led_off(LEDS_AVAILABLE);
        ao_start_scheduler();
        return 0;
 }
index 1af92f1317374040d34533229d9791cdbbf37ac7..2b18f8e58d656224f14306611e83d11d617239e1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 242f0ab229216d60b3de0c9573b7fb55a1ff5fc3..b1c472da822520a62a4010fd3fc4f91df1a89280 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 86427107beabfd0ac3259dcf4a46b940f483c80b..7a1c46ae5682556c07901aeee2a60c1b7f0a343f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,7 +39,7 @@ int
 main(void)
 {
        ao_clock_init();
-       
+
 #if HAS_STACK_GUARD
        ao_mpu_init();
 #endif
@@ -46,7 +47,7 @@ main(void)
        ao_task_init();
        ao_serial_init();
        ao_led_init(LEDS_AVAILABLE);
-       ao_led_on(AO_LED_GREEN);
+       ao_led_on(LEDS_AVAILABLE);
        ao_timer_init();
 
        ao_i2c_init();
@@ -75,7 +76,7 @@ main(void)
 
        ao_eeprom_init();
        ao_storage_init();
-       
+
        ao_flight_init();
        ao_log_init();
        ao_report_init();
@@ -97,9 +98,11 @@ main(void)
 #if HAS_SAMPLE_PROFILE
        ao_sample_profile_init();
 #endif
-       
+
        ao_pwm_init();
 
+       ao_led_off(LEDS_AVAILABLE);
+
        ao_start_scheduler();
        return 0;
 }
index 304bb7c36bbfbad576e854eb5faf18bbf3b18659..936354ed24c03e65ec67f591d293ac07f3249742 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fbb38df2cf05dba4f17203bd3bb341c40972d485..d906317309db1c4ff7d30f91cf28f05198e22445 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 46599cb2e0ef1ed83937ba34ce2546f88ea277b8..5cf42a8d861775946e7ab31b29391593aab27eb6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -35,7 +36,7 @@ int
 main(void)
 {
        ao_clock_init();
-       
+
 #if HAS_STACK_GUARD
        ao_mpu_init();
 #endif
@@ -43,7 +44,7 @@ main(void)
        ao_task_init();
        ao_serial_init();
        ao_led_init(LEDS_AVAILABLE);
-       ao_led_on(AO_LED_RED);
+       ao_led_on(LEDS_AVAILABLE);
        ao_timer_init();
 
        ao_spi_init();
@@ -66,7 +67,7 @@ main(void)
        ao_eeprom_init();
 
        ao_storage_init();
-       
+
        ao_flight_init();
        ao_log_init();
        ao_report_init();
@@ -87,7 +88,8 @@ main(void)
 #if HAS_SAMPLE_PROFILE
        ao_sample_profile_init();
 #endif
-       
+       ao_led_off(LEDS_AVAILABLE);
+
        ao_start_scheduler();
        return 0;
 }
index 304bb7c36bbfbad576e854eb5faf18bbf3b18659..936354ed24c03e65ec67f591d293ac07f3249742 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/src/telemetrum-v3.0/.gitignore b/src/telemetrum-v3.0/.gitignore
new file mode 100644 (file)
index 0000000..35ce24d
--- /dev/null
@@ -0,0 +1,2 @@
+ao_product.h
+telemetrum-*.elf
diff --git a/src/telemetrum-v3.0/Makefile b/src/telemetrum-v3.0/Makefile
new file mode 100644 (file)
index 0000000..002cc3f
--- /dev/null
@@ -0,0 +1,130 @@
+#
+# AltOS build
+#
+#
+
+include ../stm/Makefile.defs
+
+INC = \
+       ao.h \
+       ao_arch.h \
+       ao_arch_funcs.h \
+       ao_boot.h \
+       ao_companion.h \
+       ao_data.h \
+       ao_sample.h \
+       ao_pins.h \
+       altitude-pa.h \
+       ao_kalman.h \
+       ao_product.h \
+       ao_ms5607.h \
+       ao_mma655x.h \
+       ao_cc1200_CC1200.h \
+       ao_profile.h \
+       ao_task.h \
+       ao_whiten.h \
+       ao_sample_profile.h \
+       ao_mpu.h \
+       stm32l.h \
+       Makefile
+
+#PROFILE=ao_profile.c
+#PROFILE_DEF=-DAO_PROFILE=1
+
+#SAMPLE_PROFILE=ao_sample_profile.c \
+#      ao_sample_profile_timer.c
+#SAMPLE_PROFILE_DEF=-DHAS_SAMPLE_PROFILE=1
+
+#STACK_GUARD=ao_mpu_stm.c
+#STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
+
+MATH_SRC=\
+       ef_log.c
+
+ALTOS_SRC = \
+       ao_boot_chain.c \
+       ao_interrupt.c \
+       ao_product.c \
+       ao_romconfig.c \
+       ao_cmd.c \
+       ao_config.c \
+       ao_task.c \
+       ao_led.c \
+       ao_stdio.c \
+       ao_panic.c \
+       ao_timer.c \
+       ao_mutex.c \
+       ao_serial_stm.c \
+       ao_gps_ublox.c \
+       ao_gps_show.c \
+       ao_gps_report_metrum.c \
+       ao_ignite.c \
+       ao_freq.c \
+       ao_dma_stm.c \
+       ao_spi_stm.c \
+       ao_cc1200.c \
+       ao_fec_tx.c \
+       ao_fec_rx.c \
+       ao_data.c \
+       ao_ms5607.c \
+       ao_mma655x.c \
+       ao_adc_stm.c \
+       ao_beep_stm.c \
+       ao_storage.c \
+       ao_m25.c \
+       ao_usb_stm.c \
+       ao_exti_stm.c \
+       ao_eeprom_stm.c \
+       ao_report.c \
+       ao_convert_pa.c \
+       ao_convert_volt.c \
+       ao_log.c \
+       ao_log_metrum.c \
+       ao_sample.c \
+       ao_kalman.c \
+       ao_flight.c \
+       ao_telemetry.c \
+       ao_packet_slave.c \
+       ao_packet.c \
+       ao_companion.c \
+       ao_aprs.c \
+       $(MATH_SRC) \
+       $(PROFILE) \
+       $(SAMPLE_PROFILE) \
+       $(STACK_GUARD)
+
+PRODUCT=TeleMetrum-v3.0
+PRODUCT_DEF=-DTELEMETRUM_V_3_0
+IDPRODUCT=0x000b
+
+CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF) -Os -g
+
+PROGNAME=telemetrum-v3.0
+PROG=$(PROGNAME)-$(VERSION).elf
+HEX=$(PROGNAME)-$(VERSION).ihx
+
+SRC=$(ALTOS_SRC) ao_telemetrum.c
+OBJ=$(SRC:.c=.o)
+
+all: $(PROG) $(HEX)
+
+$(PROG): Makefile $(OBJ) altos.ld
+       $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+
+../altitude-pa.h: make-altitude-pa
+       nickle $< > $@
+
+$(OBJ): $(INC)
+
+ao_product.h: ao-make-product.5c ../Version
+       $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
+
+distclean:     clean
+
+clean:
+       rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx
+       rm -f ao_product.h
+
+install:
+
+uninstall:
diff --git a/src/telemetrum-v3.0/ao_pins.h b/src/telemetrum-v3.0/ao_pins.h
new file mode 100644 (file)
index 0000000..ccf2f18
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * Copyright Â© 2012 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#ifndef _AO_PINS_H_
+#define _AO_PINS_H_
+
+#define HAS_TASK_QUEUE         1
+
+/* 8MHz High speed external crystal */
+#define AO_HSE                 8000000
+
+/* PLLVCO = 96MHz (so that USB will work) */
+#define AO_PLLMUL              12
+#define AO_RCC_CFGR_PLLMUL     (STM_RCC_CFGR_PLLMUL_12)
+
+/* SYSCLK = 32MHz (no need to go faster than CPU) */
+#define AO_PLLDIV              3
+#define AO_RCC_CFGR_PLLDIV     (STM_RCC_CFGR_PLLDIV_3)
+
+/* HCLK = 32MHz (CPU clock) */
+#define AO_AHB_PRESCALER       1
+#define AO_RCC_CFGR_HPRE_DIV   STM_RCC_CFGR_HPRE_DIV_1
+
+/* Run APB1 at 16MHz (HCLK/2) */
+#define AO_APB1_PRESCALER      2
+#define AO_RCC_CFGR_PPRE1_DIV  STM_RCC_CFGR_PPRE2_DIV_2
+
+/* Run APB2 at 16MHz (HCLK/2) */
+#define AO_APB2_PRESCALER      2
+#define AO_RCC_CFGR_PPRE2_DIV  STM_RCC_CFGR_PPRE2_DIV_2
+
+#define HAS_SERIAL_1           0
+#define USE_SERIAL_1_STDIN     0
+#define SERIAL_1_PB6_PB7       0
+#define SERIAL_1_PA9_PA10      1
+
+#define HAS_SERIAL_2           0
+#define USE_SERIAL_2_STDIN     0
+#define SERIAL_2_PA2_PA3       0
+#define SERIAL_2_PD5_PD6       0
+
+#define HAS_SERIAL_3           1
+#define USE_SERIAL_3_STDIN     0
+#define SERIAL_3_PB10_PB11     1
+#define SERIAL_3_PC10_PC11     0
+#define SERIAL_3_PD8_PD9       0
+
+#define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX       (512 * 1024)
+#define AO_CONFIG_MAX_SIZE                     1024
+#define LOG_ERASE_MARK                         0x55
+#define LOG_MAX_ERASE                          128
+
+#define HAS_EEPROM             1
+#define USE_INTERNAL_FLASH     0
+#define USE_EEPROM_CONFIG      1
+#define USE_STORAGE_CONFIG     0
+#define HAS_USB                        1
+#define HAS_BEEP               1
+#define HAS_BATTERY_REPORT     1
+#define BEEPER_CHANNEL         4
+#define HAS_RADIO              1
+#define HAS_TELEMETRY          1
+#define HAS_APRS               1
+#define HAS_COMPANION          1
+
+#define HAS_SPI_1              1
+#define SPI_1_PA5_PA6_PA7      1       /* Barometer */
+#define SPI_1_PB3_PB4_PB5      1       /* Accelerometer */
+#define SPI_1_PE13_PE14_PE15   0
+#define SPI_1_OSPEEDR          STM_OSPEEDR_10MHz
+
+#define HAS_SPI_2              1
+#define SPI_2_PB13_PB14_PB15   1       /* Flash, Companion, Radio */
+#define SPI_2_PD1_PD3_PD4      0
+#define SPI_2_OSPEEDR          STM_OSPEEDR_10MHz
+
+#define SPI_2_PORT             (&stm_gpiob)
+#define SPI_2_SCK_PIN          13
+#define SPI_2_MISO_PIN         14
+#define SPI_2_MOSI_PIN         15
+
+#define HAS_I2C_1              0
+#define I2C_1_PB8_PB9          0
+
+#define HAS_I2C_2              0
+#define I2C_2_PB10_PB11                0
+
+#define PACKET_HAS_SLAVE       1
+#define PACKET_HAS_MASTER      0
+
+#define LOW_LEVEL_DEBUG                0
+
+#define LED_PORT_ENABLE                STM_RCC_AHBENR_GPIOCEN
+#define LED_PORT               (&stm_gpioc)
+#define LED_PIN_RED            14
+#define LED_PIN_GREEN          15
+#define AO_LED_RED             (1 << LED_PIN_RED)
+#define AO_LED_GREEN           (1 << LED_PIN_GREEN)
+
+#define LEDS_AVAILABLE         (AO_LED_RED | AO_LED_GREEN)
+
+#define HAS_GPS                        1
+#define HAS_FLIGHT             1
+#define HAS_ADC                        1
+#define HAS_ADC_TEMP           1
+#define HAS_LOG                        1
+
+/*
+ * Igniter
+ */
+
+#define HAS_IGNITE             1
+#define HAS_IGNITE_REPORT      1
+
+#define AO_SENSE_DROGUE(p)     ((p)->adc.sense_a)
+#define AO_SENSE_MAIN(p)       ((p)->adc.sense_m)
+#define AO_IGNITER_CLOSED      400
+#define AO_IGNITER_OPEN                60
+
+/* Drogue */
+#define AO_IGNITER_DROGUE_PORT (&stm_gpioa)
+#define AO_IGNITER_DROGUE_PIN  8
+
+/* Main */
+#define AO_IGNITER_MAIN_PORT   (&stm_gpioa)
+#define AO_IGNITER_MAIN_PIN    9
+
+#define AO_IGNITER_SET_DROGUE(v)       stm_gpio_set(AO_IGNITER_DROGUE_PORT, AO_IGNITER_DROGUE_PIN, v)
+#define AO_IGNITER_SET_MAIN(v)         stm_gpio_set(AO_IGNITER_MAIN_PORT, AO_IGNITER_MAIN_PIN, v)
+
+/*
+ * ADC
+ */
+#define AO_DATA_RING           32
+#define AO_ADC_NUM_SENSE       2
+
+struct ao_adc {
+       int16_t                 sense_a;
+       int16_t                 sense_m;
+       int16_t                 v_batt;
+       int16_t                 temp;
+};
+
+#define AO_ADC_DUMP(p) \
+       printf("tick: %5u drogue: %5d main: %5d batt: %5d\n", \
+              (p)->tick, \
+              (p)->adc.sense_a, (p)->adc.sense_m, \
+              (p)->adc.v_batt);
+
+#define AO_ADC_SENSE_DROGUE    0
+#define AO_ADC_SENSE_DROGUE_PORT       (&stm_gpioa)
+#define AO_ADC_SENSE_DROGUE_PIN        0
+
+#define AO_ADC_SENSE_MAIN      1
+#define AO_ADC_SENSE_MAIN_PORT (&stm_gpioa)
+#define AO_ADC_SENSE_MAIN_PIN  1
+
+#define AO_ADC_V_BATT          8
+#define AO_ADC_V_BATT_PORT     (&stm_gpiob)
+#define AO_ADC_V_BATT_PIN      0
+
+#define AO_ADC_TEMP            16
+
+#define AO_ADC_RCC_AHBENR      ((1 << STM_RCC_AHBENR_GPIOAEN) | \
+                                (1 << STM_RCC_AHBENR_GPIOEEN) | \
+                                (1 << STM_RCC_AHBENR_GPIOBEN))
+
+#define AO_NUM_ADC_PIN         3
+
+#define AO_ADC_PIN0_PORT       AO_ADC_SENSE_DROGUE_PORT
+#define AO_ADC_PIN0_PIN                AO_ADC_SENSE_DROGUE_PIN
+#define AO_ADC_PIN1_PORT       AO_ADC_SENSE_MAIN_PORT
+#define AO_ADC_PIN1_PIN                AO_ADC_SENSE_MAIN_PIN
+#define AO_ADC_PIN2_PORT       AO_ADC_V_BATT_PORT
+#define AO_ADC_PIN2_PIN                AO_ADC_V_BATT_PIN
+
+#define AO_NUM_ADC             (AO_NUM_ADC_PIN + 1)
+
+#define AO_ADC_SQ1             AO_ADC_SENSE_DROGUE
+#define AO_ADC_SQ2             AO_ADC_SENSE_MAIN
+#define AO_ADC_SQ3             AO_ADC_V_BATT
+#define AO_ADC_SQ4             AO_ADC_TEMP
+
+/*
+ * Voltage divider on ADC battery sampler
+ */
+#define AO_BATTERY_DIV_PLUS    56      /* 5.6k */
+#define AO_BATTERY_DIV_MINUS   100     /* 10k */
+
+/*
+ * Voltage divider on ADC igniter samplers
+ */
+#define AO_IGNITE_DIV_PLUS     100     /* 100k */
+#define AO_IGNITE_DIV_MINUS    27      /* 27k */
+
+/*
+ * ADC reference in decivolts
+ */
+#define AO_ADC_REFERENCE_DV    33
+
+/*
+ * GPS
+ */
+
+#define AO_SERIAL_SPEED_UBLOX  AO_SERIAL_SPEED_9600
+
+#define ao_gps_getchar         ao_serial3_getchar
+#define ao_gps_putchar         ao_serial3_putchar
+#define ao_gps_set_speed       ao_serial3_set_speed
+#define ao_gps_fifo            (ao_stm_usart3.rx_fifo)
+
+/*
+ * Pressure sensor settings
+ */
+#define HAS_MS5607             1
+#define HAS_MS5611             0
+#define AO_MS5607_PRIVATE_PINS 1
+#define AO_MS5607_CS_PORT      (&stm_gpiob)
+#define AO_MS5607_CS_PIN       12
+#define AO_MS5607_CS_MASK      (1 << AO_MS5607_CS)
+#define AO_MS5607_MISO_PORT    (&stm_gpioa)
+#define AO_MS5607_MISO_PIN     6
+#define AO_MS5607_MISO_MASK    (1 << AO_MS5607_MISO)
+#define AO_MS5607_SPI_INDEX    AO_SPI_1_PA5_PA6_PA7
+
+/*
+ * SPI Flash memory
+ */
+
+#define M25_MAX_CHIPS          1
+#define AO_M25_SPI_CS_PORT     (&stm_gpiob)
+#define AO_M25_SPI_CS_MASK     (1 << 8)
+#define AO_M25_SPI_BUS         AO_SPI_2_PB13_PB14_PB15
+
+/*
+ * Radio (cc1200)
+ */
+
+/* gets pretty close to 434.550 */
+
+#define AO_RADIO_CAL_DEFAULT   5695733
+
+#define AO_CC1200_SPI_CS_PORT  (&stm_gpioa)
+#define AO_CC1200_SPI_CS_PIN   2
+#define AO_CC1200_SPI_BUS      AO_SPI_2_PB13_PB14_PB15
+#define AO_CC1200_SPI          stm_spi2
+
+#define AO_CC1200_INT_PORT             (&stm_gpioa)
+#define AO_CC1200_INT_PIN              (3)
+#define AO_CC1200_MCU_WAKEUP_PORT      (&stm_gpioa)
+#define AO_CC1200_MCU_WAKEUP_PIN       (4)
+
+#define AO_CC1200_INT_GPIO     2
+#define AO_CC1200_INT_GPIO_IOCFG       CC1200_IOCFG2
+
+#define AO_CC1200_MARC_GPIO    3
+#define AO_CC1200_MARC_GPIO_IOCFG      CC1200_IOCFG3
+
+#define HAS_BOOT_RADIO         0
+
+#define HAS_HIGHG_ACCEL                1
+
+/*
+ * mma655x
+ */
+
+#define HAS_MMA655X            1
+#define AO_MMA655X_SPI_INDEX   AO_SPI_1_PB3_PB4_PB5
+#define AO_MMA655X_CS_PORT     (&stm_gpiob)
+#define AO_MMA655X_CS_PIN      9
+#define AO_MMA655X_INVERT      1
+
+#define NUM_CMDS               16
+
+/*
+ * Companion
+ */
+
+#define AO_COMPANION_CS_PORT   (&stm_gpiob)
+#define AO_COMPANION_CS_PIN    (6)
+#define AO_COMPANION_SPI_BUS   AO_SPI_2_PB13_PB14_PB15
+
+/*
+ * Monitor
+ */
+
+#define HAS_MONITOR            0
+#define LEGACY_MONITOR         0
+#define HAS_MONITOR_PUT                1
+#define AO_MONITOR_LED         0
+#define HAS_RSSI               0
+
+/*
+ * Profiling Viterbi decoding
+ */
+
+#ifndef AO_PROFILE
+#define AO_PROFILE             0
+#endif
+
+#endif /* _AO_PINS_H_ */
diff --git a/src/telemetrum-v3.0/ao_telemetrum.c b/src/telemetrum-v3.0/ao_telemetrum.c
new file mode 100644 (file)
index 0000000..6349d18
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright Â© 2016 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include <ao.h>
+#include <ao_ms5607.h>
+#include <ao_mma655x.h>
+#include <ao_log.h>
+#include <ao_exti.h>
+#include <ao_packet.h>
+#include <ao_companion.h>
+#include <ao_eeprom.h>
+#include <ao_profile.h>
+#if HAS_SAMPLE_PROFILE
+#include <ao_sample_profile.h>
+#endif
+#if HAS_STACK_GUARD
+#include <ao_mpu.h>
+#endif
+
+int
+main(void)
+{
+       ao_clock_init();
+
+#if HAS_STACK_GUARD
+       ao_mpu_init();
+#endif
+
+       ao_task_init();
+       ao_serial_init();
+       ao_led_init(LEDS_AVAILABLE);
+       ao_led_on(AO_LED_RED);
+       ao_timer_init();
+
+       ao_spi_init();
+       ao_dma_init();
+       ao_exti_init();
+
+       ao_adc_init();
+#if HAS_BEEP
+       ao_beep_init();
+#endif
+       ao_cmd_init();
+
+#if HAS_MS5607
+       ao_ms5607_init();
+#endif
+#if HAS_MMA655X
+       ao_mma655x_init();
+#endif
+
+       ao_eeprom_init();
+
+       ao_storage_init();
+
+       ao_flight_init();
+       ao_log_init();
+       ao_report_init();
+
+       ao_usb_init();
+       ao_gps_init();
+       ao_gps_report_metrum_init();
+       ao_telemetry_init();
+       ao_radio_init();
+       ao_packet_slave_init(FALSE);
+       ao_igniter_init();
+       ao_companion_init();
+
+       ao_config_init();
+#if AO_PROFILE
+       ao_profile_init();
+#endif
+#if HAS_SAMPLE_PROFILE
+       ao_sample_profile_init();
+#endif
+
+       ao_start_scheduler();
+       return 0;
+}
diff --git a/src/telemetrum-v3.0/flash-loader/Makefile b/src/telemetrum-v3.0/flash-loader/Makefile
new file mode 100644 (file)
index 0000000..5f26541
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# AltOS flash loader build
+#
+#
+
+TOPDIR=../..
+HARDWARE=telemetrum-v3.0
+include $(TOPDIR)/stm/Makefile-flash.defs
diff --git a/src/telemetrum-v3.0/flash-loader/ao_pins.h b/src/telemetrum-v3.0/flash-loader/ao_pins.h
new file mode 100644 (file)
index 0000000..936354e
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright Â© 2013 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#ifndef _AO_PINS_H_
+#define _AO_PINS_H_
+
+/* External crystal at 8MHz */
+#define AO_HSE         8000000
+
+#include <ao_flash_stm_pins.h>
+
+/* Companion port cs_companion0 PB6 */
+
+#define AO_BOOT_PIN                    1
+#define AO_BOOT_APPLICATION_GPIO       stm_gpiob
+#define AO_BOOT_APPLICATION_PIN                6
+#define AO_BOOT_APPLICATION_VALUE      1
+#define AO_BOOT_APPLICATION_MODE       AO_EXTI_MODE_PULL_UP
+
+#endif /* _AO_PINS_H_ */
index e75adc072528fd25aa533b89ba2d25a4ba73e058..4f1d36dfd2a41f8520af03e75982a97effc534a5 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0d8dd1cb637785bdffe8f7f4794e3c25ddba80b4..68bc3dfe9fac1ca320c2cd6a3c98ce9ba9caa2af 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2a7dbd3b17375fb01fada84bd404cb85555877bb..e47d368c71ba372f0597b9f200dd7ed6d2eeea82 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 21bf8a73279203e079c8bb11349098b2ca867867..43a5ed4200cead857647757f8ec06ae37fed05d9 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 03bd59db230c35b411976b8cbe5c2e7460ccf54b..c78766cdefa398847eec50df67418575d3696e50 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 74eef8f48147659492e8ae873ae95538401db361..05bb8653bab7e05f085d430f797ba1acf8baa850 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 907ff34197e55a0645efc6d34f65c96b71009012..8eaf92998f9384f7c471dea1391025baa7211297 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e6e19f67b5f876defd9f1d07941ca3e8818dc703..535cc624e575a387ac094852a24d69fc45d7d5f4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 68bb44eee20fbeacc0c7ee5a1dd5815481d82425..6baa88c856d5bbde59001da0e2cb62e62df897c2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d602f6464005c2e3708171b80082c4b883da9ce4..713c49f92e87bfdd020f1a442a8fc3bbb2425fc3 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ba7177afe88451011b7d6f8f168f0ff40dc97d8d..d25a77b7c8b99f4483fb2a05b73f3aac95853d1e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 472af53430cfa21dac9e846a0429444562813702..8d9f7a2f1c0f55b579140aa7bbd292d58d4ebc13 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index dcedbfca72ddaffcb2c7406223519aec9bf37789..4b65df8d8d8716f4f50ddb4ff368f4ccbc7b3ccd 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index ae505dea77e7e732a81bcc995624ff8adef4b959..3852668af9014e133f05ffa1aefa5c69859a10ac 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d1309024063270a99f3ac6ec507236e1c00bed4f..63be71c6b378b6b0424bf7cc3ff708ce278a5dc4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 216a4b79667dd42302b7751675669c9bea33c6fd..cbced6ae31435fb870ee8c599c02d88f9d564d5a 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f71c3052d3e175d881af95f7daa3fa929456fd4f..bd7f2ff8196c2759af7d9adc9790bf71e6f816ea 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 543bbcc304b032ab69c6442dbf380ca62d596473..7c1ecc15f50607a20ee3cbcd1d0a7c688aea8ba6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 5eb7118d260bdf44e51488f55f23569c5f0d10d6..61e7905a864fbbba533ccfcc0d821fca158fb92e 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 83efbb4fcf01ce650d9317c9f552800e81495333..05334bbf158e96f53d2861c416d0a43034ddf6a2 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8557a1c79648b2538622d4c79562fb7a4b416bfa..07538ee0185010fc1095cd67ba60780fff02b6ee 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f4af707e2bd54b68d873ad168915184001173728..059c22843d2fd138c1a668b5196c1ff14204b811 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1c571f1cbd1587aeedeb4c79c78655ed98943fda..4876d21e685a9863e3d16c5c19434bac329df57b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index b630f1d315a110ba75e45a25218b8a2cfb1be562..ac232deb70994c55ba697d94887b5a5de95050a0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a72f6cc863fcd37b64fd56fac8759822e0914992..20118728d9cda05eec71fe0892744f90b1ae313f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 879094b547f70a60b558b87bb90edbe26d49fe3b..d908f4dbeebdee342ff9d17751e8599a5ab47950 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a8046009c3143c8c0dd4e6d7e136c0efa37c1c49..cb385600213993d2ec1afedc7229efe887fac806 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 1997d2052a49d37ccde48087416c7c67a4fc2c75..2b23f967d80c44f553aa417588e63388d17a4e66 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 42713b6ec842fb2023e9e4441527cdbdf6e5ed08..e34babec5f4fdd748871b5e21fa6c05196eefad4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 9fa8b715f28853512a82ebb32a7fa444c088cf70..9e7c2c3393fa3aa35dbf838f8c2f2bb91ea07e92 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0f2b1ea60f2fb8d826db8619852d18db6e24b981..2fd5df33003b8bf2a12b15f1a25e8acc126b5526 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 66e12337fc0fabdddc0d80776bb983fae5de2104..cb15a250618bbb5ec89beb344e68106aed8b1a9b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index a8046009c3143c8c0dd4e6d7e136c0efa37c1c49..cb385600213993d2ec1afedc7229efe887fac806 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index d68a02af44fffd9c43ac2ce50aca7507042a003a..b7a33609a4e60f208e0cd9c928764fe9b53ed395 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2897e06a321cf6e0ac7a547e36c65a1e59985dc0..66eaaa2bfa593bbf4ba80396ed11f1d7cee3863f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index f8bb1cf18f754b34d1e87f60725d14d596a66c3f..d24e7471eaeba1a54cb7eef73a58082ffda00572 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index fcba619526b564c99d29abe9797a492c9d863eec..dd3965b48960597ac70ca5525fc47abf9dfbb7d7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 0daccc20108a3eb93d54185a62fa4efa31e58383..a9c80dc00d537cd60cb87c892e72abfad257583f 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 8e2f6627d8a369d98f60157478d1452964fe52d6..55ee370e33b2a4e1dda1e3b3a0dd629114d1f7a4 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 or any later version of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e17bdbaaae5aef0c1d065be706c063e4e8fb9f40..f4fa7216b979631c301d57a6fe420daca2a3dacf 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 2a5b2b69e3f9295fbde4f3aee21ece137d07e73f..619523268e9268e8f8280e30016fb9e93e344591 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index e01ef47e46e64d12bb32e14051adba8b91908d6e..9ba0b7a59cabf42b7cee93b371750a530d0fd2e1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 765a8ce4f6e0e62985dd2f26110b9435116dc3f5..5479f43a025927f762c4051aed61dff1b84185d6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
index 6cd440c54b2c86f1141f2585edeee4aab6f44e02..ac37af315b50b8abbc9695ddebd8807b1edfcad0 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of