2018-07-25 16:08:53 -06:00
|
|
|
use Mix.Config
|
|
|
|
|
2018-11-15 11:24:09 -07:00
|
|
|
config :farmbot_core, Farmbot.AssetWorker.Farmbot.Asset.FarmEvent, checkup_time_ms: 10_000
|
2018-11-19 12:32:54 -07:00
|
|
|
config :farmbot_core, Farmbot.AssetWorker.Farmbot.Asset.PersistentRegimen, checkup_time_ms: 10_000
|
2018-07-25 16:08:53 -06:00
|
|
|
|
2018-11-15 11:24:09 -07:00
|
|
|
config :farmbot_core, Farmbot.AssetWorker.Farmbot.Asset.FarmwareInstallation,
|
|
|
|
error_retry_time_ms: 30_000,
|
|
|
|
install_dir: "/tmp/farmware"
|
2018-07-25 16:08:53 -06:00
|
|
|
|
2018-11-15 11:24:09 -07:00
|
|
|
config :farmbot_core, Elixir.Farmbot.AssetWorker.Farmbot.Asset.PinBinding,
|
|
|
|
gpio_handler: Farmbot.PinBindingWorker.StubGPIOHandler,
|
|
|
|
error_retry_time_ms: 30_000
|
2018-08-09 12:56:16 -06:00
|
|
|
|
2018-11-30 13:40:57 -07:00
|
|
|
config :farmbot_core, Farmbot.Leds, gpio_handler: Farmbot.Leds.StubHandler
|
|
|
|
|
|
|
|
config :farmbot_core, Farmbot.JSON, json_parser: Farmbot.JSON.JasonParser
|
|
|
|
|
2018-07-25 16:08:53 -06:00
|
|
|
# Customize non-Elixir parts of the firmware. See
|
|
|
|
# https://hexdocs.pm/nerves/advanced-configuration.html for details.
|
|
|
|
config :nerves, :firmware,
|
|
|
|
rootfs_overlay: "rootfs_overlay",
|
|
|
|
provisioning: :nerves_hub
|
|
|
|
|
2018-11-15 11:24:09 -07:00
|
|
|
config :farmbot_core, Farmbot.AssetMonitor, checkup_time_ms: 30_000
|
2018-07-25 16:08:53 -06:00
|
|
|
|
2018-11-30 13:40:57 -07:00
|
|
|
config :farmbot_core, Farmbot.EctoMigrator,
|
2018-11-15 11:24:09 -07:00
|
|
|
default_firmware_io_logs: false,
|
|
|
|
default_server: "https://my.farm.bot",
|
|
|
|
default_currently_on_beta:
|
|
|
|
String.contains?(to_string(:os.cmd('git rev-parse --abbrev-ref HEAD')), "beta")
|
2018-07-25 16:08:53 -06:00
|
|
|
|
2018-11-30 13:40:57 -07:00
|
|
|
config :farmbot_core, Farmbot.Core.CeleryScript.RunTimeWrapper,
|
|
|
|
celery_script_io_layer: Farmbot.OS.IOLayer
|
2018-07-25 16:08:53 -06:00
|
|
|
|
2019-01-22 12:43:18 -07:00
|
|
|
config :farmbot_core, Farmbot.BotState.FileSystem,
|
|
|
|
root_dir: "/tmp/farmbot_state",
|
|
|
|
sleep_time: 200
|
|
|
|
|
2018-11-15 11:24:09 -07:00
|
|
|
config :ecto, json_library: Farmbot.JSON
|
2018-07-25 16:08:53 -06:00
|
|
|
|
2018-11-28 13:12:25 -07:00
|
|
|
config :farmbot_core,
|
2018-07-25 16:08:53 -06:00
|
|
|
ecto_repos: [Farmbot.Config.Repo, Farmbot.Logger.Repo, Farmbot.Asset.Repo]
|
|
|
|
|
2018-11-23 11:25:14 -07:00
|
|
|
config :farmbot, Farmbot.OS.FileSystem, data_path: "/tmp/farmbot"
|
|
|
|
config :farmbot, Farmbot.System, system_tasks: Farmbot.Host.SystemTasks
|
2018-11-15 11:24:09 -07:00
|
|
|
|
2018-11-23 11:25:14 -07:00
|
|
|
config :farmbot, Farmbot.Platform.Supervisor,
|
2018-11-15 11:24:09 -07:00
|
|
|
platform_children: [
|
|
|
|
Farmbot.Host.Configurator
|
2018-07-25 16:08:53 -06:00
|
|
|
]
|
|
|
|
|
2018-11-15 11:24:09 -07:00
|
|
|
import_config("lagger.exs")
|
2018-12-03 13:21:41 -07:00
|
|
|
config :logger, backends: [:console]
|
|
|
|
config :logger, :console, metadata: [:changeset, :module]
|
2018-11-23 11:25:14 -07:00
|
|
|
|
|
|
|
if Mix.Project.config()[:target] == "host" do
|
2018-11-28 13:12:25 -07:00
|
|
|
if File.exists?("config/host/#{Mix.env()}.exs") do
|
|
|
|
import_config("host/#{Mix.env()}.exs")
|
|
|
|
end
|
2018-11-23 11:25:14 -07:00
|
|
|
else
|
|
|
|
import_config("target/#{Mix.env()}.exs")
|
2018-11-28 13:12:25 -07:00
|
|
|
|
|
|
|
if File.exists?("config/target/#{Mix.Project.config()[:target]}.exs") do
|
|
|
|
import_config("target/#{Mix.Project.config()[:target]}.exs")
|
|
|
|
end
|
2018-11-23 11:25:14 -07:00
|
|
|
end
|