Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.7
3.3.8
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"
ruby "~> 3.3.7"
ruby "~> 3.3.8"

gem "rails", "~> 6"
gem "active_model_serializers"
Expand Down Expand Up @@ -28,7 +28,6 @@ gem "tzinfo-data" # For validation of user selected timezone names
gem "valid_url"
gem "thwait"
gem "lograge" # Used to filter repetitive RabbitMQ logs.
gem "scout_apm"

group :development, :test do
gem "climate_control"
Expand Down
46 changes: 20 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ GEM
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
amq-protocol (2.3.3)
ast (2.4.3)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.9)
Expand Down Expand Up @@ -119,7 +118,7 @@ GEM
railties (>= 5.0.0)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
faraday (2.13.0)
faraday (2.13.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
Expand All @@ -129,26 +128,26 @@ GEM
net-http (>= 0.5.0)
globalid (1.2.1)
activesupport (>= 6.1)
google-apis-core (0.16.0)
google-apis-core (0.17.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 1.9)
httpclient (>= 2.8.3, < 3.a)
mini_mime (~> 1.0)
mutex_m
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
google-apis-iamcredentials_v1 (0.22.0)
google-apis-iamcredentials_v1 (0.23.0)
google-apis-core (>= 0.15.0, < 2.a)
google-apis-storage_v1 (0.50.0)
google-apis-storage_v1 (0.51.0)
google-apis-core (>= 0.15.0, < 2.a)
google-cloud-core (1.8.0)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (2.2.2)
google-cloud-env (2.3.0)
base64 (~> 0.2)
faraday (>= 1.0, < 3.a)
google-cloud-errors (1.5.0)
google-cloud-storage (1.55.0)
google-cloud-storage (1.56.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-core (~> 0.13)
Expand All @@ -157,7 +156,7 @@ GEM
google-cloud-core (~> 1.6)
googleauth (~> 1.9)
mini_mime (~> 1.0)
google-logging-utils (0.1.0)
google-logging-utils (0.2.0)
googleauth (1.14.0)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
Expand All @@ -172,7 +171,7 @@ GEM
mutex_m
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.10.2)
json (2.11.3)
jsonapi-renderer (0.2.2)
jwt (2.10.1)
base64
Expand Down Expand Up @@ -212,7 +211,7 @@ GEM
mutex_m (0.3.0)
net-http (0.6.0)
uri
net-imap (0.5.6)
net-imap (0.5.8)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -222,15 +221,12 @@ GEM
net-smtp (0.5.1)
net-protocol
nio4r (2.7.4)
nokogiri (1.18.7-aarch64-linux-gnu)
nokogiri (1.18.8-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.7-x86_64-linux-gnu)
nokogiri (1.18.8-x86_64-linux-gnu)
racc (~> 1.4)
orm_adapter (0.5.0)
os (1.1.4)
parser (3.3.7.4)
ast (~> 2.4.1)
racc
passenger (6.0.27)
rack (>= 1.6.13)
rackup (>= 1.0.1)
Expand All @@ -241,7 +237,7 @@ GEM
method_source (~> 1.0)
pry-rails (0.3.11)
pry (>= 0.13.0)
public_suffix (6.0.1)
public_suffix (6.0.2)
rabbitmq_http_api_client (3.0.0)
addressable (~> 2.7)
faraday (~> 2.9)
Expand Down Expand Up @@ -313,10 +309,10 @@ GEM
rspec-mocks (~> 3.13.0)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
rspec-expectations (3.13.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
rspec-mocks (3.13.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (6.1.5)
Expand All @@ -327,17 +323,15 @@ GEM
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.2)
rspec-support (3.13.3)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
scout_apm (5.6.2)
parser
secure_headers (7.1.0)
set (1.1.1)
signet (0.19.0)
signet (0.20.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand All @@ -354,8 +348,9 @@ GEM
sorted_set (1.0.3)
rbtree
set (~> 1.0)
sprockets (4.2.1)
sprockets (4.2.2)
concurrent-ruby (~> 1.0)
logger
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
Expand Down Expand Up @@ -426,7 +421,6 @@ DEPENDENCIES
rspec-rails
rspec_junit_formatter
scenic
scout_apm
secure_headers
simplecov
simplecov-cobertura
Expand All @@ -437,7 +431,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 3.3.7p123
ruby 3.3.8p144

BUNDLED WITH
2.6.5
2.6.8
1 change: 1 addition & 0 deletions app/models/fbos_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class MissingSerial < StandardError; end
FARMDUINO_K15 = "farmduino_k15",
FARMDUINO_K16 = "farmduino_k16",
FARMDUINO_K17 = "farmduino_k17",
FARMDUINO_K18 = "farmduino_k18",
EXPRESS_K10 = "express_k10",
EXPRESS_K11 = "express_k11",
EXPRESS_K12 = "express_k12",
Expand Down
8 changes: 7 additions & 1 deletion app/mutations/devices/create_seed_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ class CreateSeedData < Mutations::Command
"genesis_1.5" => Devices::Seeders::GenesisOneFive,
"genesis_1.6" => Devices::Seeders::GenesisOneSix,
"genesis_1.7" => Devices::Seeders::GenesisOneSeven,
"genesis_1.8" => Devices::Seeders::GenesisOneEight,
"genesis_xl_1.4" => Devices::Seeders::GenesisXlOneFour,
"genesis_xl_1.5" => Devices::Seeders::GenesisXlOneFive,
"genesis_xl_1.6" => Devices::Seeders::GenesisXlOneSix,
"genesis_xl_1.7" => Devices::Seeders::GenesisXlOneSeven,
"genesis_xl_1.8" => Devices::Seeders::GenesisXlOneEight,

"none" => Devices::Seeders::None,
}
Expand All @@ -41,12 +43,16 @@ def seeder
end

def run_seeds!
if demo
Devices::Seeders::DemoAccountSeeder.new(device).before_product_line_seeder
end

seeder.class::COMMAND_ORDER.map do |cmd|
seeder.send(cmd)
end

if demo
Devices::Seeders::DemoAccountSeeder.new(device).misc(product_line)
Devices::Seeders::DemoAccountSeeder.new(device).after_product_line_seeder(product_line)
end
end
end
Expand Down
8 changes: 7 additions & 1 deletion app/mutations/devices/seeders/abstract_express.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,19 @@ def settings_gantry_height
end

def settings_default_map_size_y
device.web_app_config.update!(map_size_y: 1_200)
device.web_app_config.update!(map_size_y: 930)
end

def settings_hide_sensors
device.web_app_config.update!(hide_sensors: true)
end

def settings_three_d
FarmwareEnvs::Create.run(
{key: "3D_beamLength", value: "1200"},
device: device)
end

private

def seed_trough_1_id
Expand Down
26 changes: 3 additions & 23 deletions app/mutations/devices/seeders/abstract_seeder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ class AbstractSeeder

# DO NOT ALPHABETIZE. ORDER MATTERS! - RC
COMMAND_ORDER = [
# PLANTS =================================
:plants,

# GROUPS =================================
:point_groups_spinach,
:point_groups_broccoli,
:point_groups_beet,
:point_groups_all_plants,
:point_groups_all_points,
:point_groups_all_weeds,
Expand Down Expand Up @@ -43,6 +37,7 @@ class AbstractSeeder
:settings_firmware,
:settings_gantry_height,
:settings_hide_sensors,
:settings_three_d,

# TOOLS ==================================
:tools_seed_bin,
Expand All @@ -66,9 +61,6 @@ class AbstractSeeder
:tool_slots_slot_8,
:tool_slots_slot_9,

# WEBCAM FEEDS ===========================
:webcam_feeds,

# SEQUENCES ==============================
:sequences_mount_tool,
:sequences_dismount_tool,
Expand All @@ -86,9 +78,6 @@ class AbstractSeeder
:sequences_dispense_water,
:sequences_mow_all_weeds,
:sequences_pick_from_seed_tray,

# EVERYTHING ELSE ========================
:misc,
]

def initialize(device)
Expand All @@ -99,8 +88,6 @@ def settings_hide_sensors
device.web_app_config.update!(hide_sensors: false)
end

def plants; end

def peripherals_lighting
add_peripheral(7, ToolNames::LIGHTING)
end
Expand Down Expand Up @@ -142,12 +129,6 @@ def sequences_water_plant
Sequences::Create.run!(s, device: device)
end

def point_groups_spinach; end

def point_groups_broccoli; end

def point_groups_beet; end

def point_groups_all_plants
add_point_group(name: "All plants")
end
Expand Down Expand Up @@ -230,6 +211,8 @@ def settings_soil_height
device.fbos_config.update!(soil_height: -500)
end

def settings_three_d; end

def tool_slots_slot_1; end
def tool_slots_slot_2; end
def tool_slots_slot_3; end
Expand All @@ -252,9 +235,6 @@ def tools_watering_nozzle
def tools_weeder; end
def tools_rotary; end

def webcam_feeds; end
def misc; end

private

def install_sequence_version_by_name(name)
Expand Down
Loading