Change default firmware_hard from "arduino" to "none"
parent
894419b8ae
commit
27b2002782
|
@ -6,6 +6,7 @@ class FbosConfig < ApplicationRecord
|
|||
after_save :maybe_sync_nerves, on: [:create, :update]
|
||||
|
||||
FIRMWARE_HARDWARE = [
|
||||
NONE = "none",
|
||||
ARDUINO = "arduino",
|
||||
FARMDUINO = "farmduino",
|
||||
FARMDUINO_K14 = "farmduino_k14",
|
||||
|
|
|
@ -61,13 +61,15 @@ module Devices
|
|||
# * Disable the behavior in production ENVs
|
||||
# * Put this code back in the main array when v8 is released.
|
||||
# SEQUENCES ==============================
|
||||
COMMAND_ORDER += [:sequences_tool_error,
|
||||
:sequences_mount_tool,
|
||||
:sequences_pick_up_seed,
|
||||
:sequences_plant_seed,
|
||||
:sequences_take_photo_of_plant,
|
||||
:sequences_unmount_tool,
|
||||
:sequences_water_plant]
|
||||
[:sequences_tool_error,
|
||||
:sequences_mount_tool,
|
||||
:sequences_pick_up_seed,
|
||||
:sequences_plant_seed,
|
||||
:sequences_take_photo_of_plant,
|
||||
:sequences_unmount_tool,
|
||||
:sequences_water_plant].map do |x|
|
||||
COMMAND_ORDER.push(x)
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(device)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeFirmwareHardwareDefaultValue < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_default(:fbos_configs, :firmware_hardware, from: "arduino", to: "none")
|
||||
end
|
||||
end
|
|
@ -5,6 +5,7 @@ SET client_encoding = 'UTF8';
|
|||
SET standard_conforming_strings = on;
|
||||
SELECT pg_catalog.set_config('search_path', '', false);
|
||||
SET check_function_bodies = false;
|
||||
SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
|
@ -2963,6 +2964,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||
('20190419174811'),
|
||||
('20190501143201'),
|
||||
('20190502163453'),
|
||||
('20190504170018');
|
||||
('20190504170018'),
|
||||
('20190512015442');
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ describe Api::FbosConfigsController do
|
|||
arduino_debug_messages: false,
|
||||
network_not_found_timer: nil,
|
||||
os_auto_update: true,
|
||||
firmware_hardware: "arduino",
|
||||
firmware_hardware: "none",
|
||||
api_migrated: true
|
||||
}.to_a.map do |key, value|
|
||||
actual = json[key]
|
||||
|
|
|
@ -40,4 +40,8 @@ describe FbosConfig do
|
|||
config.update_attributes!(update_channel: "beta")
|
||||
end
|
||||
end
|
||||
|
||||
it "has default firmware_hardware" do
|
||||
expect(FbosConfig.create!.firmware_hardware).to eq("none")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue