poe-svelte-ui-lib 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/Button/README.md +18 -18
  2. package/dist/GUIRenderer/GUIRenderer.svelte +30 -0
  3. package/dist/WidgetFOC/FOCIcon.svelte +9 -0
  4. package/dist/WidgetFOC/FOCIcon.svelte.d.ts +18 -0
  5. package/dist/WidgetFOC/README.md +48 -0
  6. package/dist/WidgetFOC/WidgetFOC.svelte +318 -0
  7. package/dist/WidgetFOC/WidgetFOC.svelte.d.ts +4 -0
  8. package/dist/WidgetFOC/WidgetFOCProps.svelte +37 -0
  9. package/dist/WidgetFOC/WidgetFOCProps.svelte.d.ts +9 -0
  10. package/dist/WidgetHoming/HomingIcon.svelte +9 -0
  11. package/dist/WidgetHoming/HomingIcon.svelte.d.ts +18 -0
  12. package/dist/WidgetHoming/README.md +52 -0
  13. package/dist/WidgetHoming/WidgetHoming.svelte +264 -0
  14. package/dist/WidgetHoming/WidgetHoming.svelte.d.ts +4 -0
  15. package/dist/WidgetHoming/WidgetHomingProps.svelte +37 -0
  16. package/dist/WidgetHoming/WidgetHomingProps.svelte.d.ts +9 -0
  17. package/dist/constructor.d.ts +3 -1
  18. package/dist/constructor.js +5 -1
  19. package/dist/defaults.js +4 -0
  20. package/dist/dictionaries/firmware/poe_cmd.h +6 -8
  21. package/dist/dictionaries/firmware/poe_msg.h +7 -3
  22. package/dist/dictionaries/generated/poe_cmd.js +2 -4
  23. package/dist/dictionaries/generated/poe_gui.d.ts +3 -1
  24. package/dist/dictionaries/generated/poe_gui.js +3 -1
  25. package/dist/dictionaries/generated/poe_msg.js +11 -3
  26. package/dist/dictionaries/poe_cmd.yaml +5 -6
  27. package/dist/dictionaries/poe_gui.yaml +2 -0
  28. package/dist/dictionaries/poe_msg.yaml +7 -3
  29. package/dist/gui.d.ts +57 -0
  30. package/dist/gui.js +59 -0
  31. package/dist/guiViews.d.ts +4 -0
  32. package/dist/guiViews.js +4 -0
  33. package/dist/index.d.ts +3 -1
  34. package/dist/index.js +2 -0
  35. package/dist/locales/constructor.d.ts +30 -0
  36. package/dist/locales/constructor.js +22 -0
  37. package/dist/locales/i18n.js +2 -0
  38. package/dist/locales/localize.js +1 -0
  39. package/dist/locales/translations.d.ts +630 -0
  40. package/dist/locales/translations.js +226 -0
  41. package/dist/protocols/PROTOCOL.md +1 -1
  42. package/dist/registry.js +4 -0
  43. package/dist/types.d.ts +40 -2
  44. package/package.json +1 -1
@@ -769,6 +769,232 @@ const translations = {
769
769
  en: "Chip flags:\n**Overspeed** - the shaft turns faster than the chip can track\n**Weak field** - the magnet is too far or shifted\n**Low supply** - the chip voltage is below normal\n**Auto calibration** - result of the last auto calibration, after power-up - “none”",
770
770
  zh: "芯片标志:\n**转速过高** - 轴转速超过芯片跟踪能力\n**磁场弱** - 磁铁太远或偏移\n**电压低** - 芯片电压低于正常\n**自动校准** - 上次自动校准结果,上电后为“无”",
771
771
  },
772
+ "widget.foc.title": { ru: "Мотор FOC", en: "FOC motor", zh: "FOC 电机" },
773
+ "widget.foc.on": { ru: "включён", en: "on", zh: "已启用" },
774
+ "widget.foc.off": { ru: "выключен", en: "off", zh: "已停用" },
775
+ "widget.foc.enable": { ru: "Включить", en: "Enable", zh: "启用" },
776
+ "widget.foc.disable": { ru: "Выключить", en: "Disable", zh: "停用" },
777
+ "widget.foc.flag.zero": { ru: "ноль известен", en: "zero known", zh: "零点已知" },
778
+ "widget.foc.flag.noZero": { ru: "ноль не найден", en: "no zero", zh: "无零点" },
779
+ "widget.foc.flag.moving": { ru: "выход в угол", en: "moving", zh: "移动中" },
780
+ "widget.foc.flag.calibrating": { ru: "калибровка нуля", en: "zero calibration", zh: "零点校准" },
781
+ "widget.foc.flag.busy": { ru: "занят процедурой", en: "busy", zh: "执行程序中" },
782
+ "widget.foc.flag.timeout": { ru: "поток уставок прервался", en: "setpoint stream lost", zh: "设定值流中断" },
783
+ "widget.foc.angle": { ru: "Угол", en: "Angle", zh: "角度" },
784
+ "widget.foc.speed": { ru: "Скорость", en: "Speed", zh: "速度" },
785
+ "widget.foc.zero": { ru: "Калибровка нуля", en: "Zero calibration", zh: "零点校准" },
786
+ "widget.foc.tune": { ru: "Автонастройка", en: "Auto-tuning", zh: "自动整定" },
787
+ "widget.foc.defaults": { ru: "Заводские", en: "Defaults", zh: "出厂设置" },
788
+ "widget.foc.section.motor": { ru: "Мотор", en: "Motor", zh: "电机" },
789
+ "widget.foc.section.limits": { ru: "Пределы и режимы", en: "Limits and modes", zh: "限制与模式" },
790
+ "widget.foc.section.current": { ru: "Контур тока", en: "Current loop", zh: "电流环" },
791
+ "widget.foc.section.velocity": { ru: "Контур скорости", en: "Velocity loop", zh: "速度环" },
792
+ "widget.foc.section.angle": { ru: "Контур угла", en: "Angle loop", zh: "角度环" },
793
+ "widget.foc.section.sensor": { ru: "Датчик тока и фильтры", en: "Current sensor and filters", zh: "电流传感器与滤波" },
794
+ "widget.foc.field.M_Type": { ru: "Тип мотора", en: "Motor type", zh: "电机类型" },
795
+ "widget.foc.field.M_PP": { ru: "Пары полюсов", en: "Pole pairs", zh: "极对数" },
796
+ "widget.foc.field.M_R": { ru: "R фазы", en: "Phase R", zh: "相电阻" },
797
+ "widget.foc.field.M_L": { ru: "L фазы", en: "Phase L", zh: "相电感" },
798
+ "widget.foc.field.M_KV": { ru: "KV", en: "KV", zh: "KV" },
799
+ "widget.foc.field.M_Dir": { ru: "Направление", en: "Direction", zh: "方向" },
800
+ "widget.foc.field.ZEA": { ru: "Ноль", en: "Zero", zh: "零点" },
801
+ "widget.foc.field.M_VL": { ru: "Предел напряжения", en: "Voltage limit", zh: "电压限制" },
802
+ "widget.foc.field.M_CL": { ru: "Предел тока", en: "Current limit", zh: "电流限制" },
803
+ "widget.foc.field.M_VLL": { ru: "Предел скорости", en: "Speed limit", zh: "速度限制" },
804
+ "widget.foc.field.M_CTO": { ru: "Тайм-аут уставок", en: "Setpoint timeout", zh: "设定值超时" },
805
+ "widget.foc.field.M_Torq": { ru: "Режим момента", en: "Torque mode", zh: "力矩模式" },
806
+ "widget.foc.field.M_Mod": { ru: "Модуляция", en: "Modulation", zh: "调制" },
807
+ "widget.foc.field.C_Kp": { ru: "Kp", en: "Kp", zh: "Kp" },
808
+ "widget.foc.field.C_Ki": { ru: "Ki", en: "Ki", zh: "Ki" },
809
+ "widget.foc.field.C_Kd": { ru: "Kd", en: "Kd", zh: "Kd" },
810
+ "widget.foc.field.C_Lim": { ru: "Предел", en: "Limit", zh: "限制" },
811
+ "widget.foc.field.C_Ramp": { ru: "Нарастание", en: "Ramp", zh: "斜率" },
812
+ "widget.foc.field.V_Kp": { ru: "Kp", en: "Kp", zh: "Kp" },
813
+ "widget.foc.field.V_Ki": { ru: "Ki", en: "Ki", zh: "Ki" },
814
+ "widget.foc.field.V_Kd": { ru: "Kd", en: "Kd", zh: "Kd" },
815
+ "widget.foc.field.V_Lim": { ru: "Предел", en: "Limit", zh: "限制" },
816
+ "widget.foc.field.V_Ramp": { ru: "Нарастание", en: "Ramp", zh: "斜率" },
817
+ "widget.foc.field.A_Kp": { ru: "Kp", en: "Kp", zh: "Kp" },
818
+ "widget.foc.field.A_Lim": { ru: "Предел скорости", en: "Speed limit", zh: "速度限制" },
819
+ "widget.foc.field.A_Ramp": { ru: "Предел разгона", en: "Acceleration limit", zh: "加速度限制" },
820
+ "widget.foc.field.S_Gain": { ru: "Чувствительность", en: "Sensitivity", zh: "灵敏度" },
821
+ "widget.foc.field.S_OffA": { ru: "Ноль A", en: "Zero A", zh: "零点 A" },
822
+ "widget.foc.field.S_OffB": { ru: "Ноль B", en: "Zero B", zh: "零点 B" },
823
+ "widget.foc.field.S_OffC": { ru: "Ноль C", en: "Zero C", zh: "零点 C" },
824
+ "widget.foc.field.S_VTf": { ru: "Фильтр скорости", en: "Speed filter", zh: "速度滤波" },
825
+ "widget.foc.field.S_CTf": { ru: "Фильтр тока", en: "Current filter", zh: "电流滤波" },
826
+ "widget.foc.field.TuneHz": { ru: "Полоса", en: "Bandwidth", zh: "带宽" },
827
+ "widget.foc.opt.bldc": { ru: "BLDC", en: "BLDC", zh: "BLDC" },
828
+ "widget.foc.opt.stepper": { ru: "Шаговый", en: "Stepper", zh: "步进" },
829
+ "widget.foc.opt.voltage": { ru: "Напряжение", en: "Voltage", zh: "电压" },
830
+ "widget.foc.opt.estCurrent": { ru: "Оценка тока", en: "Estimated current", zh: "估算电流" },
831
+ "widget.foc.opt.dcCurrent": { ru: "Модуль тока", en: "Current magnitude", zh: "电流幅值" },
832
+ "widget.foc.opt.focCurrent": { ru: "FOC по току", en: "FOC current", zh: "FOC 电流" },
833
+ "widget.foc.opt.spwm": { ru: "SPWM", en: "SPWM", zh: "SPWM" },
834
+ "widget.foc.opt.svm": { ru: "SVM", en: "SVM", zh: "SVM" },
835
+ "widget.foc.opt.trap120": { ru: "Trap 120", en: "Trap 120", zh: "Trap 120" },
836
+ "widget.foc.opt.trap150": { ru: "Trap 150", en: "Trap 150", zh: "Trap 150" },
837
+ "widget.foc.unit.ohm": { ru: "Ом", en: "Ω", zh: "Ω" },
838
+ "widget.foc.unit.h": { ru: "Гн", en: "H", zh: "H" },
839
+ "widget.foc.unit.kv": { ru: "об/мин/В", en: "rpm/V", zh: "rpm/V" },
840
+ "widget.foc.unit.edeg": { ru: "эл. °", en: "el. °", zh: "电角度 °" },
841
+ "widget.foc.unit.volt": { ru: "В", en: "V", zh: "V" },
842
+ "widget.foc.unit.amp": { ru: "А", en: "A", zh: "A" },
843
+ "widget.foc.unit.dps": { ru: "°/с", en: "°/s", zh: "°/s" },
844
+ "widget.foc.unit.dps2": { ru: "°/с²", en: "°/s²", zh: "°/s²" },
845
+ "widget.foc.unit.ms": { ru: "мс", en: "ms", zh: "ms" },
846
+ "widget.foc.unit.vpa": { ru: "В/А", en: "V/A", zh: "V/A" },
847
+ "widget.foc.unit.sec": { ru: "с", en: "s", zh: "s" },
848
+ "widget.foc.unit.hz": { ru: "Гц", en: "Hz", zh: "Hz" },
849
+ "widget.foc.zero.confirm": {
850
+ ru: "Калибровка нуля плавно поворачивает вал, чтобы найти ноль и направление мотора.\nВал должен вращаться свободно: снимите нагрузку и проверьте, что ничего не намотается и не упрётся.",
851
+ en: "Zero calibration slowly turns the shaft to find the motor zero and direction.\nThe shaft must turn freely: remove the load and make sure nothing can wind up or hit a stop.",
852
+ zh: "零点校准会缓慢转动轴,以确定电机零点和方向。\n轴必须能自由转动:请卸下负载,并确认没有东西会缠绕或卡住。",
853
+ },
854
+ "widget.foc.tune.confirm": {
855
+ ru: "Автонастройка около секунды разгоняет вал в обе стороны и сохраняет новые коэффициенты регуляторов.\nВал должен вращаться свободно: снимите нагрузку и проверьте, что ничего не намотается и не упрётся.",
856
+ en: "Auto-tuning spins the shaft both ways for about a second and saves new controller gains.\nThe shaft must turn freely: remove the load and make sure nothing can wind up or hit a stop.",
857
+ zh: "自动整定会让轴正反转约一秒,并保存新的调节器参数。\n轴必须能自由转动:请卸下负载,并确认没有东西会缠绕或卡住。",
858
+ },
859
+ "widget.foc.defaults.confirm": {
860
+ ru: "Вернуть заводские настройки мотора и регуляторов? Ноль и направление мотора сохранятся.",
861
+ en: "Restore the factory motor and controller settings? The motor zero and direction are kept.",
862
+ zh: "恢复电机和调节器的出厂设置?电机零点和方向将保留。",
863
+ },
864
+ "widget.foc.hint.state": {
865
+ ru: "**Включён** - мотор держит угол или крутится по уставкам\n**Выключен** - фазы без напряжения, вал свободен\n**Ноль известен** - найдены ноль и направление мотора\n**Выход в угол** - ось плавно едет к цели\n**Калибровка нуля** - идёт поиск нуля мотора\n**Занят процедурой** - команды движения по шине не исполняются\n**Поток уставок прервался** - уставки перестали приходить, ось держит угол",
866
+ en: "**On** - the motor holds an angle or follows setpoints\n**Off** - phases without voltage, the shaft is free\n**Zero known** - the motor zero and direction are found\n**Moving** - the axis smoothly goes to the target\n**Zero calibration** - the motor zero is being found\n**Busy** - motion commands from the bus are not executed\n**Setpoint stream lost** - setpoints stopped coming, the axis holds its angle",
867
+ zh: "**已启用** - 电机保持角度或按设定值运行\n**已停用** - 相无电压,轴自由\n**零点已知** - 已找到电机零点和方向\n**移动中** - 轴平稳移向目标\n**零点校准** - 正在寻找电机零点\n**执行程序中** - 不执行总线上的运动命令\n**设定值流中断** - 设定值不再到达,轴保持角度",
868
+ },
869
+ "widget.foc.hint.enable": {
870
+ ru: "**Включить** - мотор держит текущий угол\n**Выключить** - фазы без напряжения, вал свободен",
871
+ en: "**Enable** - the motor holds the current angle\n**Disable** - phases without voltage, the shaft is free",
872
+ zh: "**启用** - 电机保持当前角度\n**停用** - 相无电压,轴自由",
873
+ },
874
+ "widget.foc.hint.readout": {
875
+ ru: "**Угол** - угол вала, 0-360°\n**Скорость** - скорость вала, °/с\n**Iq** - ток момента, А\n**Uq** - напряжение по оси q, В\n**Обновление** - раз в секунду, пока виджет раскрыт",
876
+ en: "**Angle** - shaft angle, 0-360°\n**Speed** - shaft speed, °/s\n**Iq** - torque current, A\n**Uq** - q-axis voltage, V\n**Update** - once a second while the widget is open",
877
+ zh: "**角度** - 轴角度,0-360°\n**速度** - 轴速度,°/s\n**Iq** - 力矩电流,A\n**Uq** - q 轴电压,V\n**更新** - 组件展开时每秒一次",
878
+ },
879
+ "widget.foc.hint.zero": {
880
+ ru: "**Калибровка нуля** - около 1.3 с без рывков находит ноль и направление мотора и сохраняет их\n**Когда нужна** - после замены мотора или магнита",
881
+ en: "**Zero calibration** - in about 1.3 s finds the motor zero and direction without jerks and saves them\n**When needed** - after replacing the motor or the magnet",
882
+ zh: "**零点校准** - 约 1.3 秒平稳找到电机零点和方向并保存\n**何时需要** - 更换电机或磁铁后",
883
+ },
884
+ "widget.foc.hint.tune": {
885
+ ru: "**Автонастройка** - около 1 с меряет разгон вала и считает регуляторы скорости и угла\n**Полоса** - скорость реакции регуляторов, Гц: больше - быстрее и жёстче, но ближе к раскачке",
886
+ en: "**Auto-tuning** - in about 1 s measures the shaft acceleration and computes the speed and angle loops\n**Bandwidth** - controller response speed, Hz: higher - faster and stiffer, but closer to oscillation",
887
+ zh: "**自动整定** - 约 1 秒测量轴加速度并计算速度环和角度环\n**带宽** - 调节器响应速度,Hz:越高越快越硬,但更接近振荡",
888
+ },
889
+ "widget.foc.hint.motor": {
890
+ ru: "**Тип, пары полюсов, R, L, KV** - параметры мотора\n**Направление и ноль** - ставит калибровка нуля, только чтение",
891
+ en: "**Type, pole pairs, R, L, KV** - motor parameters\n**Direction and zero** - set by zero calibration, read only",
892
+ zh: "**类型、极对数、R、L、KV** - 电机参数\n**方向和零点** - 由零点校准设置,只读",
893
+ },
894
+ "widget.foc.hint.limits": {
895
+ ru: "**Пределы** - напряжения, В, тока, А, и скорости, °/с\n**Тайм-аут уставок** - через сколько мс без уставок ось держит угол, 0 - выключен\n**Режим момента** - чем задаётся момент: напряжением или током\n**Модуляция** - форма напряжения на фазах",
896
+ en: "**Limits** - voltage, V, current, A, and speed, °/s\n**Setpoint timeout** - after how many ms without setpoints the axis holds its angle, 0 - off\n**Torque mode** - what sets the torque: voltage or current\n**Modulation** - the phase voltage waveform",
897
+ zh: "**限制** - 电压,V,电流,A,速度,°/s\n**设定值超时** - 无设定值多少 ms 后轴保持角度,0 - 关闭\n**力矩模式** - 力矩由电压还是电流设定\n**调制** - 相电压波形",
898
+ },
899
+ "widget.foc.hint.current": {
900
+ ru: "**Контур тока** - ПИД тока, выход - напряжение, В",
901
+ en: "**Current loop** - current PID, output - voltage, V",
902
+ zh: "**电流环** - 电流 PID,输出为电压,V",
903
+ },
904
+ "widget.foc.hint.velocity": {
905
+ ru: "**Контур скорости** - ПИД скорости, коэффициенты на °/с\n**Выход** - напряжение или ток, по режиму момента",
906
+ en: "**Velocity loop** - speed PID, gains per °/s\n**Output** - voltage or current, by the torque mode",
907
+ zh: "**速度环** - 速度 PID,系数按 °/s\n**输出** - 按力矩模式为电压或电流",
908
+ },
909
+ "widget.foc.hint.angle": {
910
+ ru: "**Kp** - жёсткость удержания угла, 1/с\n**Предел скорости** - быстрее ось к цели не идёт, °/с\n**Предел разгона** - °/с², 0 - без предела",
911
+ en: "**Kp** - angle holding stiffness, 1/s\n**Speed limit** - the axis does not go to the target faster, °/s\n**Acceleration limit** - °/s², 0 - no limit",
912
+ zh: "**Kp** - 角度保持刚度,1/s\n**速度限制** - 轴向目标运动不会更快,°/s\n**加速度限制** - °/s²,0 - 无限制",
913
+ },
914
+ "widget.foc.hint.sensor": {
915
+ ru: "**Чувствительность** - датчика тока, В/А\n**Нули A, B, C** - мотор меряет сам при включении, только чтение\n**Фильтры** - сглаживание скорости и тока, с",
916
+ en: "**Sensitivity** - of the current sensor, V/A\n**Zeros A, B, C** - the motor measures them at power-up, read only\n**Filters** - speed and current smoothing, s",
917
+ zh: "**灵敏度** - 电流传感器,V/A\n**零点 A、B、C** - 电机上电时自行测量,只读\n**滤波** - 速度和电流平滑,s",
918
+ },
919
+ "widget.home.title": { ru: "База оси", en: "Axis home", zh: "轴基准" },
920
+ "widget.home.type.none": { ru: "Базы нет", en: "No home", zh: "无基准" },
921
+ "widget.home.type.stall": { ru: "Механические упоры", en: "Mechanical stops", zh: "机械限位" },
922
+ "widget.home.type.other": { ru: "Свой способ", en: "Custom method", zh: "自定义方式" },
923
+ "widget.home.st.idle": { ru: "не искали", en: "not searched", zh: "未搜索" },
924
+ "widget.home.st.search": { ru: "идёт поиск", en: "searching", zh: "搜索中" },
925
+ "widget.home.st.done": { ru: "база найдена", en: "home found", zh: "已找到基准" },
926
+ "widget.home.st.failed": { ru: "отказ", en: "failed", zh: "失败" },
927
+ "widget.home.search": { ru: "Найти базу", en: "Find home", zh: "查找基准" },
928
+ "widget.home.goHome": { ru: "Домой", en: "Go home", zh: "回原点" },
929
+ "widget.home.search.confirm.stall": {
930
+ ru: "Поиск базы ведёт ось медленно в одну сторону до упора, потом в другую, и выводит её в центр между упорами.\nМотор упирается с обычной мощностью: уберите с пути посторонние предметы и проверьте, что провода не натянутся.",
931
+ en: "Home search slowly drives the axis one way to a stop, then the other way, and moves it to the center between the stops.\nThe motor pushes against the stops at normal power: clear the path and make sure no cable gets pulled tight.",
932
+ zh: "基准搜索会让轴缓慢转向一侧直到限位,再转向另一侧,然后移到两限位的中心。\n电机以正常功率顶住限位:请清除路径上的物体,并确认线缆不会被拉紧。",
933
+ },
934
+ "widget.home.search.confirm.other": {
935
+ ru: "Поиск базы сам ведёт ось в обе стороны до краёв и выводит её домой.\nУберите с пути посторонние предметы и проверьте, что провода не натянутся.",
936
+ en: "Home search drives the axis both ways to the ends by itself and moves it home.\nClear the path and make sure no cable gets pulled tight.",
937
+ zh: "基准搜索会自行让轴向两侧运动到端点并回到原点。\n请清除路径上的物体,并确认线缆不会被拉紧。",
938
+ },
939
+ "widget.home.err.noStop": {
940
+ ru: "Край не найден: ось прошла больше оборота",
941
+ en: "No end found: the axis went more than a turn",
942
+ zh: "未找到端点:轴转动超过一圈",
943
+ },
944
+ "widget.home.err.range": {
945
+ ru: "Между краями слишком мало хода, края не сохранены",
946
+ en: "Too little travel between the ends, the ends were not saved",
947
+ zh: "端点之间行程过小,端点未保存",
948
+ },
949
+ "widget.home.err.aborted": {
950
+ ru: "Поиск прерван: мотор или модуль выключили",
951
+ en: "Search stopped: the motor or the module was turned off",
952
+ zh: "搜索中止:电机或模块已关闭",
953
+ },
954
+ "widget.home.err.state": {
955
+ ru: "Поиск не начат: ось занята или выключена",
956
+ en: "Search not started: the axis is busy or off",
957
+ zh: "未开始搜索:轴忙或已关闭",
958
+ },
959
+ "widget.home.homePoint": { ru: "Дом", en: "Home", zh: "原点" },
960
+ "widget.home.lo": { ru: "Край Lo", en: "End Lo", zh: "端点 Lo" },
961
+ "widget.home.hi": { ru: "Край Hi", en: "End Hi", zh: "端点 Hi" },
962
+ "widget.home.range": { ru: "Ход", en: "Travel", zh: "行程" },
963
+ "widget.home.pos": { ru: "Вал", en: "Shaft", zh: "轴" },
964
+ "widget.home.settings": { ru: "Настройки поиска", en: "Search settings", zh: "搜索设置" },
965
+ "widget.home.field.Off": { ru: "Дом от центра", en: "Home from center", zh: "原点偏移" },
966
+ "widget.home.field.Speed": { ru: "Скорость", en: "Speed", zh: "速度" },
967
+ "widget.home.field.Marg": { ru: "Отступ", en: "Margin", zh: "余量" },
968
+ "widget.home.field.Force": { ru: "Усилие", en: "Force", zh: "力度" },
969
+ "widget.home.field.Lag": { ru: "Порог упора", en: "Stop threshold", zh: "限位阈值" },
970
+ "widget.home.unit.deg": { ru: "°", en: "°", zh: "°" },
971
+ "widget.home.unit.dps": { ru: "°/с", en: "°/s", zh: "°/s" },
972
+ "widget.home.unit.pct": { ru: "%", en: "%", zh: "%" },
973
+ "widget.home.hint.state": {
974
+ ru: "**Способ** - как ищется база, выбирает прошивка устройства\n**Не искали** - поиска не было после включения\n**Идёт поиск** - ось ищет края и выходит домой\n**База найдена** - края сохранены, ось дома\n**Отказ** - поиск не удался, причина под строкой",
975
+ en: "**Method** - how the home is searched, chosen by the device firmware\n**Not searched** - no search since power-up\n**Searching** - the axis looks for the ends and goes home\n**Home found** - the ends are saved, the axis is at home\n**Failed** - the search failed, the reason is below",
976
+ zh: "**方式** - 基准搜索方式,由设备固件选择\n**未搜索** - 上电后未搜索\n**搜索中** - 轴正在寻找端点并回原点\n**已找到基准** - 端点已保存,轴在原点\n**失败** - 搜索失败,原因见下方",
977
+ },
978
+ "widget.home.hint.search": {
979
+ ru: "**Найти базу** - ось сама находит оба края и плавно выходит домой\n**Когда нужна** - один раз при сборке и после переборки оси: края сохраняются в устройстве\n**Во время поиска** - команды движения по шине не исполняются",
980
+ en: "**Find home** - the axis finds both ends by itself and smoothly goes home\n**When needed** - once at assembly and after the axis is rebuilt: the ends are saved in the device\n**While searching** - motion commands from the bus are not executed",
981
+ zh: "**查找基准** - 轴自行找到两个端点并平稳回到原点\n**何时需要** - 装配时和轴重新装配后一次:端点保存在设备中\n**搜索期间** - 不执行总线上的运动命令",
982
+ },
983
+ "widget.home.hint.home": {
984
+ ru: "**Домой** - ось плавно едет в центр между краями плюс «Дом от центра»\n**Без базы** - в угол «Дом от центра» от нуля датчика",
985
+ en: '**Go home** - the axis smoothly moves to the center between the ends plus "Home from center"\n**Without a home** - to the "Home from center" angle from the sensor zero',
986
+ zh: "**回原点** - 轴平稳移动到两端点中心加「原点偏移」\n**无基准时** - 移动到距传感器零点「原点偏移」角度处",
987
+ },
988
+ "widget.home.hint.range": {
989
+ ru: "**Полоса** - разрешённый ход от края Lo до края Hi\n**Зелёное** - где ось работает, без отступов от краёв\n**Синяя черта** - дом\n**Кружок** - вал сейчас, красный - за краем\n**Углы** - по датчику оси, °",
990
+ en: "**Bar** - allowed travel from end Lo to end Hi\n**Green** - where the axis works, without the margins\n**Blue line** - home\n**Circle** - the shaft now, red - beyond an end\n**Angles** - by the axis sensor, °",
991
+ zh: "**条形** - 从端点 Lo 到端点 Hi 的允许行程\n**绿色** - 轴的工作范围,不含端点余量\n**蓝线** - 原点\n**圆点** - 当前轴位置,红色 - 超出端点\n**角度** - 按轴传感器,°",
992
+ },
993
+ "widget.home.hint.settings": {
994
+ ru: "**Дом от центра** - смещение дома от середины между краями, °\n**Скорость** - поиска и выхода домой, °/с\n**Отступ** - ближе к краям ось не подходит, °\n**Усилие** - способ «упоры»: с какой силой мотор жмёт в упор, % от полного\n**Порог упора** - способ «упоры»: насколько цель ушла от стоящего вала, °",
995
+ en: '**Home from center** - home offset from the middle between the ends, °\n**Speed** - for the search and going home, °/s\n**Margin** - the axis does not come closer to the ends, °\n**Force** - "stops" method: how hard the motor pushes into a stop, % of full\n**Stop threshold** - "stops" method: how far the target got ahead of the standing shaft, °',
996
+ zh: "**原点偏移** - 原点相对两端点中点的偏移,°\n**速度** - 搜索和回原点的速度,°/s\n**余量** - 轴不会更靠近端点,°\n**力度** - 「限位」方式:电机顶住限位的力度,满力的 %\n**限位阈值** - 「限位」方式:目标超前静止轴的角度,°",
997
+ },
772
998
  "widget.mag.title": { ru: "Магнитометр", en: "Magnetometer", zh: "磁力计" },
773
999
  "widget.mag.field": { ru: "Магнитное поле", en: "Magnetic field", zh: "磁场" },
774
1000
  "widget.mag.quality": { ru: "Калибровка", en: "Calibration", zh: "校准" },
@@ -51,7 +51,7 @@
51
51
  | Уровень | Что идёт | Примеры |
52
52
  | ------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
53
53
  | 0 | Самое важное: перезагрузка, сброс, обновление, включение привода | `SystemRestart`, `SystemDefaultConfig`, `SystemResetStorage`, `FirmwareUpgrade*`, `MotionEnable` |
54
- | 1 | Служебные команды, настройки и основная работа | `ModuleConfig`, `ModuleInfo`, `ModuleFind`, `MotionTarget`, `MotionVelocity`, `MotionAngle`, `OrientationData` |
54
+ | 1 | Служебные команды, настройки и основная работа | `ModuleConfig`, `ModuleInfo`, `ModuleFind`, `MotionAngle`, `MotionVelocity`, `MotionTorque`, `OrientationData` |
55
55
  | 2 | Вспомогательные потоки и данные | `ModuleStream*`, `ModuleTelemetry*`, `SystemFileSystem` |
56
56
  | 3 | Графики, отладка и поток данных интерфейса | `DebugPlot`, `DebugLog`, `SystemDataStream` |
57
57
 
package/dist/registry.js CHANGED
@@ -28,6 +28,8 @@ import WidgetAHRS from "./WidgetAHRS/WidgetAHRS.svelte";
28
28
  import WidgetIMU from "./WidgetIMU/WidgetIMU.svelte";
29
29
  import WidgetMag from "./WidgetMag/WidgetMag.svelte";
30
30
  import WidgetEncoder from "./WidgetEncoder/WidgetEncoder.svelte";
31
+ import WidgetHoming from "./WidgetHoming/WidgetHoming.svelte";
32
+ import WidgetFOC from "./WidgetFOC/WidgetFOC.svelte";
31
33
  import { COMPONENT_META } from "./componentMeta";
32
34
  /* Компонент каждого типа - для конструктора: тянет в сборку все виджеты, поэтому GUIRenderer его не импортирует (метаданные - componentMeta.ts) */
33
35
  const VIEWS = {
@@ -61,5 +63,7 @@ const VIEWS = {
61
63
  WidgetIMU,
62
64
  WidgetMag,
63
65
  WidgetEncoder,
66
+ WidgetHoming,
67
+ WidgetFOC,
64
68
  };
65
69
  export const COMPONENTS = Object.fromEntries(Object.keys(COMPONENT_META).map((type) => [type, { ...COMPONENT_META[type], view: VIEWS[type] }]));
package/dist/types.d.ts CHANGED
@@ -2,11 +2,11 @@ import type { Component, Snippet } from "svelte";
2
2
  import type { AccentColor } from "./accent";
3
3
  import type { IMissionPlan } from "./WidgetMap/mission/plan";
4
4
  import type { IRoutePlan } from "./WidgetMap/mission/route";
5
- import type { IWidgetWiFiConfig, IWidgetDeviceInfoConfig, IWidgetRGBStripConfig, IWidgetPFDData, IWidgetMapData, IWidgetAHRSData, IWidgetIMUData, IWidgetMagData, IWidgetEncoderData } from "./gui";
5
+ import type { IWidgetWiFiConfig, IWidgetDeviceInfoConfig, IWidgetRGBStripConfig, IWidgetPFDData, IWidgetMapData, IWidgetAHRSData, IWidgetIMUData, IWidgetMagData, IWidgetEncoderData, IWidgetHomingData, IWidgetFOCData } from "./gui";
6
6
  import type { LoRaParams } from "./WidgetLoRa/lora";
7
7
  export type { AccentColor } from "./accent";
8
8
  export type { PropertyChange } from "./propsEditor";
9
- export type { IWidgetWiFiConfig, IWidgetDeviceInfoConfig, IWidgetRGBStripConfig, IWidgetPFDData, IWidgetMapData, IWidgetAHRSData, IWidgetIMUData, IWidgetMagData, IWidgetEncoderData, } from "./gui";
9
+ export type { IWidgetWiFiConfig, IWidgetDeviceInfoConfig, IWidgetRGBStripConfig, IWidgetPFDData, IWidgetMapData, IWidgetAHRSData, IWidgetIMUData, IWidgetMagData, IWidgetEncoderData, IWidgetHomingData, IWidgetFOCData, } from "./gui";
10
10
  export type { AHRSParam, IAHRSAlgorithm } from "./WidgetAHRS/ahrs";
11
11
  export type { LoRaParams, LoRaParam, LoRaValues, ILoRaParamConfig, ILoRaOption } from "./WidgetLoRa/lora";
12
12
  export type IconSource = Component<any> | string;
@@ -41,6 +41,8 @@ export interface UIComponentPropsMap {
41
41
  WidgetIMU: IWidgetIMUProps;
42
42
  WidgetMag: IWidgetMagProps;
43
43
  WidgetEncoder: IWidgetEncoderProps;
44
+ WidgetHoming: IWidgetHomingProps;
45
+ WidgetFOC: IWidgetFOCProps;
44
46
  }
45
47
  export type UIType = keyof UIComponentPropsMap;
46
48
  export type UIComponent<K extends UIType = UIType> = {
@@ -913,6 +915,42 @@ export interface IWidgetEncoderProps {
913
915
  onCalibrate?: (cfg: number) => void;
914
916
  onRefresh?: () => void;
915
917
  }
918
+ export interface IWidgetHomingProps {
919
+ id?: string;
920
+ wrapperClass?: string;
921
+ accent?: AccentColor;
922
+ label?: {
923
+ name?: string;
924
+ };
925
+ value?: Partial<IWidgetHomingData>;
926
+ keys?: Partial<Record<keyof IWidgetHomingData, string>>;
927
+ searchMs?: number;
928
+ collapsed?: boolean;
929
+ persistKey?: string;
930
+ onSearch?: () => void;
931
+ onHome?: () => void;
932
+ onSave?: (values: Partial<Record<keyof IWidgetHomingData, number>>) => void;
933
+ onRefresh?: () => void;
934
+ }
935
+ export interface IWidgetFOCProps {
936
+ id?: string;
937
+ wrapperClass?: string;
938
+ accent?: AccentColor;
939
+ label?: {
940
+ name?: string;
941
+ };
942
+ value?: Partial<IWidgetFOCData>;
943
+ keys?: Partial<Record<keyof IWidgetFOCData, string>>;
944
+ refreshMs?: number;
945
+ collapsed?: boolean;
946
+ persistKey?: string;
947
+ onEnable?: (on: boolean) => void;
948
+ onZero?: () => void;
949
+ onTune?: (hz: number) => void;
950
+ onSave?: (values: Partial<Record<keyof IWidgetFOCData, number>>) => void;
951
+ onDefaults?: () => void;
952
+ onRefresh?: () => void;
953
+ }
916
954
  export interface IWidgetMapProps {
917
955
  id?: string;
918
956
  wrapperClass?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "3.7.0",
3
+ "version": "3.9.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Oleg-Perevyshin/ElementsUI.git"