Update latest_corpus.ts

pull/305/head
Rick Carlino 2017-01-03 14:26:40 -06:00
parent 884f44080f
commit 9f25182ae9
3 changed files with 5 additions and 391 deletions

View File

@ -11,7 +11,7 @@ class Device < ActiveRecord::Base
has_many :tool_bays, dependent: :destroy
has_many :tools, dependent: :destroy
has_one :planting_area, dependent: :destroy
validates :name, uniqueness: true
validates :name, uniqueness: true
# Prevent the database from filling up with logs by deleting all logs after
# the first X records. Increasing device.max_log_count gives the user

7
latest_corpus.rb 100644 → 100755
View File

@ -6,6 +6,7 @@ require_relative "./app/lib/celery_script/argument_specification"
require_relative "./app/lib/celery_script/corpus"
require_relative "./app/lib/sequence_migration"
require_relative "./app/models/celery_script_settings_bag.rb"
require_relative "./app/models/sequence.rb"
Dir["./app/lib/sequence_migration/*.rb"].each {|file| require file }
@ -117,6 +118,6 @@ result.push(enum_type :ALLOWED_OPS,
CeleryScriptSettingsBag::ALLOWED_OPS)
result.push(enum_type :ALLOWED_PACKAGES,
CeleryScriptSettingsBag::ALLOWED_PACKAGES)
result.push(enum_type :ALLOWED_AXIS,
CeleryScriptSettingsBag::ALLOWED_AXIS)
puts result.join("")
result.push(enum_type :ALLOWED_AXIS, CeleryScriptSettingsBag::ALLOWED_AXIS)
result.push(enum_type :Color, Sequence::COLORS)
puts result.join

View File

@ -1,387 +0,0 @@
/*
THIS INTERFACE WAS AUTO GENERATED ON 2017-01-02
DO NOT EDIT THIS FILE.
IT WILL BE OVERWRITTEN ON EVERY CELERYSCRIPT UPGRADE.
*/
export interface Nothing {
kind: "nothing";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface Tool {
kind: "tool";
args: {
tool_id: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface Coordinate {
kind: "coordinate";
args: {
x: number;
y: number;
z: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface MoveAbsolute {
kind: "move_absolute";
args: {
location: Tool
| Coordinate;
speed: number;
offset: Coordinate;
};
comment?: string | undefined;
body?: undefined;
}
export interface MoveRelative {
kind: "move_relative";
args: {
x: number;
y: number;
z: number;
speed: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface WritePin {
kind: "write_pin";
args: {
pin_number: number;
pin_value: number;
pin_mode: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface ReadPin {
kind: "read_pin";
args: {
pin_number: number;
data_label: string;
pin_mode: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface Channel {
kind: "channel";
args: {
channel_name: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface Wait {
kind: "wait";
args: {
milliseconds: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface SendMessage {
kind: "send_message";
args: {
message: string;
message_type: string;
};
comment?: string | undefined;
body?: (Channel)[] | undefined;
}
export interface Execute {
kind: "execute";
args: {
sub_sequence_id: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface If {
kind: "_if";
args: {
lhs: string;
op: string;
rhs: number;
_then: Execute
| Nothing;
_else: Execute
| Nothing;
};
comment?: string | undefined;
body?: undefined;
}
export interface Sequence {
kind: "sequence";
args: {
version: number;
};
comment?: string | undefined;
body?: (MoveAbsolute
| MoveRelative
| WritePin
| ReadPin
| Wait
| SendMessage
| Execute
| If)[] | undefined;
}
export interface Home {
kind: "home";
args: {
speed: number;
axis: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface EmergencyLock {
kind: "emergency_lock";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface EmergencyUnlock {
kind: "emergency_unlock";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface ReadStatus {
kind: "read_status";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface Sync {
kind: "sync";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface CheckUpdates {
kind: "check_updates";
args: {
package: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface PowerOff {
kind: "power_off";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface Reboot {
kind: "reboot";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export interface TogglePin {
kind: "toggle_pin";
args: {
pin_number: number;
};
comment?: string | undefined;
body?: undefined;
}
export interface StartRegimen {
kind: "start_regimen";
args: {
regimen_id: number;
data_label: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface StopRegimen {
kind: "stop_regimen";
args: {
data_label: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface Explanation {
kind: "explanation";
args: {
message: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface RpcRequest {
kind: "rpc_request";
args: {
data_label: string;
};
comment?: string | undefined;
body?: (Home
| EmergencyLock
| EmergencyUnlock
| ReadStatus
| Sync
| CheckUpdates
| PowerOff
| Reboot
| TogglePin
| StartRegimen
| StopRegimen
| McuConfigUpdate
| Calibrate
| BotConfigUpdate
| Execute
| MoveAbsolute
| MoveRelative
| WritePin
| ReadPin
| Wait
| SendMessage)[] | undefined;
}
export interface RpcOk {
kind: "rpc_ok";
args: {
data_label: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface RpcError {
kind: "rpc_error";
args: {
data_label: string;
};
comment?: string | undefined;
body?: (Explanation)[] | undefined;
}
export interface Calibrate {
kind: "calibrate";
args: {
axis: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface McuConfigUpdate {
kind: "mcu_config_update";
args: {
number: number;
data_label: string;
};
comment?: string | undefined;
body?: undefined;
}
export interface BotConfigUpdate {
kind: "bot_config_update";
args: {
};
comment?: string | undefined;
body?: undefined;
}
export type CeleryNode = Nothing
| Tool
| Coordinate
| MoveAbsolute
| MoveRelative
| WritePin
| ReadPin
| Channel
| Wait
| SendMessage
| Execute
| If
| Sequence
| Home
| EmergencyLock
| EmergencyUnlock
| ReadStatus
| Sync
| CheckUpdates
| PowerOff
| Reboot
| TogglePin
| StartRegimen
| StopRegimen
| Explanation
| RpcRequest
| RpcOk
| RpcError
| Calibrate
| McuConfigUpdate
| BotConfigUpdate;
export const LATEST_VERSION = 3;
export const DIGITAL = 0;
export const ANALOG = 1;
export type ALLOWED_PIN_MODES = 0
| 1;
export type ALLOWED_MESSAGE_TYPES = "success"
| "busy"
| "warn"
| "error"
| "info"
| "fun";
export type ALLOWED_CHANNEL_NAMES = "ticker"
| "toast";
export type ALLOWED_DATA_TYPES = "string"
| "integer";
export type ALLOWED_OPS = "<"
| ">"
| "is"
| "not";
export type ALLOWED_PACKAGES = "farmbot_os"
| "arduino_firmware";
export type ALLOWED_AXIS = "x"
| "y"
| "z"
| "all";