Поделитесь своими идеями, пожеланиями и примерами в этом разделе. Идеи, за которые голосуют чаще всего, будут реализованы быстрее!
Мы перевели нашу службу поддержки на новую систему технической поддержки. С 17.01.2022 мы отключили возможность создавать обращения через личный кабинет userecho. Теперь все запросы обрабатываются по почте на support@iridi.com .
Спасибо вам за ваше понимание и хорошего дня.
Page resize from script
is it possible to change the page (or project) size from Script?
Thank you
GetCommandAtPos/GetCommandAtName
Hi
I am working with a driver written in AV&Custom systems, not a core driver.
http://wiki2.iridiummobile.net/Drivers_API#GetCommandAtName
I can see how I can get the command as described in the wiki:
[11-02-2016 17:25:19.359] INFO Name: NameCommand = id:5 name:AC Fan UP COOL data:
But can how can I then use this information to send the command to the driver from JavaScript?
Let's assume I cannot access the driver script.
Possible solutions:
1. Send the driver's command from javascript - eg I want to send a command to the driver from JavaScript so I can using
all the programming that has already been done in the driver before it
sends the command, eg bounds checking - is this possible? how?
2. Is there any way to set a driver command to an item's press event from JavaScript, like I can access the state information.
3. anything else you can think of?
thanks
Image size
When I have an javascript with:
[font=courier]IR.GetItem("Page 1").GetItem("Button").GetState(0).Image = "pict.jpg";
It ads an image to the button.
When I ad:
IR.GetItem("Page 1").GetItem("Button").Width = 500;
IR.GetItem("Page 1").GetItem("Button").Height = 100;
It changes the button size, but not the image size.
How can I change the image size in the javascript?
Jan Hein
IR.SetTimeout executes too quickly.
Create a new project
Add the following script
function hello(){
IR.Log("hello again")
}
IR.AddListener(IR.EVENT_START,0,function()
{
IR.Log("Hello");
IR.SetTimeout(600, hello)
});
Run the project, I would expect the function hello to execute anytime after 600 milliseconds. This is not the case. It always executes before.
Thanks,
Roger
Построение графиков (graph)
current timezone and other time functions
http://support.iridiummobile.net/topic/671754-cache-of-command-in-offline-mode/
This way when a request is made that is older than a few minutes it will be blocked by the server.
It works fine for now but i am afraid i will run into problems when requests are made from a different time zone.
Could you add a command to get the current timezone, or one that always returns the current time in UTC? It would be even better to have a bunch of helper functions, like the ruby time object has for instance: http://ruby-doc.org/core-1.9.3/Time.html
Here is the string which gives full date with time and time zone (GMT).
var now = new Date();
Time can be converted from UTC to GMT using the script (please see the example in the attachment).
testUTC.irpz
Project crash because of script created joystick item
To reproduce:
-download your demo project:
https://s3.amazonaws.com/iRidiumWiki2.0/i2Scripts/JS_Iridium_demo_EditItem.irpz
-make sure you can click on the joystick by placing the code last or removing the other items.
-click and watch it crash.
Tested Editor versions:
V2.1.2.16841
V2.2.1.17647
It happens because the default value of MaxX and MaxY is zero, when you create it via the script, and you cannot change it. Now you cannot use CreateItem function for the Joystic, but we'll find a solution. Thank you.
Temperature Measurement Token in Android
It would be useful to add them to System Tokens. With some correction such sensor can be used as ambient temperature sensor in the place where panel is installed.
Http request
Пытаюсь разобраться с механизмом обработки HTTP запросов. Правильно ли я понимаю что стандартным скриптом нет возможности подключится к удалённому серверу для отправки HTTP запроса используя стандартный метод GET, а исключительно через создание драйвера?
Вопрос в том что стандартный драйвер погоды YahooWeather судя по параметрам выдаёт только текущие значения и значения на следующий день.
Мне бы хотелось используя стандартный запрос "http://weather.yahooapis.com/forecastrss?w=2122265&u=c" получать значения на следующие 4 дня...
missing standard ECMAscript functions
that's why i would like to create a function and use it many times over.
The problem with this is that the variable scope is defined when creating the function, not when running it.
for example:
var a = 456;
var func_b = function() {
IR.Log(a);
}
function func_a(param_a) {
var a = 123;
param_a();
}
func_a(func_b);
This returns 456 but i want it to return 123
To fix this there should be methods like call, apply and bind but they do not seem to exist in iRidium.
I also noticed Splice() does not work. (used to remove items from an array)
What is the current level of compatibility with the ECMA standard?
Is it at least possible to add the functions that are missing?
(extra resources:)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
http://javascriptissexy.com/javascript-apply-call-and-bind-methods-are-essential-for-javascript-professionals/
Сервис поддержки клиентов работает на платформе UserEcho