phidgets 1.0.0 → 1.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 269e80f514a11868b488560279ac48490f96d6c0
4
- data.tar.gz: 3d7f3f44df420ef0354e074db95d6641f9c86270
2
+ SHA256:
3
+ metadata.gz: f39028057f62ae1139755f0623c3320d551bc702154db131311d1b1fc89699a9
4
+ data.tar.gz: 256b6934ec59ff706a8bc0b7115f1205a661a0d85270d70973a95ec49071bfb5
5
5
  SHA512:
6
- metadata.gz: 35b317744b09f8602b5250715721812bd9087a985ec88ea01f64af2ba2b7640e89611a5b07d07b39b56c8f660f9c9b3c9d7162934558c5f8b1d204e44c51b92c
7
- data.tar.gz: 7495847c8447027b0cabf86f0970d861d997cf706a1888e0cf7d1a94dd1f13788e70448259ea78f786e6d660977de0bfe3fa99acd9f58884ddfc5e34ef954034
6
+ metadata.gz: '035979497f611f70f4b6374b7aead2a4e154f4d04ae818a4b7c2e07a392bf203301478fc5aa18d888cad08bbb6fde94757793367712db458d75b5fac13744dff'
7
+ data.tar.gz: 1d6806c07448b5f09d9d226ea749d45c88028b4a2307c99d87937c833f8fc9915fded0a3542eb535a2b853c56504dcf104d09cf75ee57be389e4a3b861a70565
data/History.txt CHANGED
@@ -1,4 +1,7 @@
1
- == 1.0.0 2019-xx-xx
1
+ == 1.0.1 2019-04-12
2
+ * Fix compile error in logger
3
+
4
+ == 1.0.0 2019-03-31
2
5
  * Update to phidgets library 2.2
3
6
 
4
7
  == 0.1.3 2015-11-10
data/README.rdoc CHANGED
@@ -9,7 +9,7 @@ This gem provides a ruby interface to the phidgets library.
9
9
 
10
10
  == FEATURES/PROBLEMS:
11
11
 
12
- * Version 1.0 of this gem if for Phidget Lib 2.2. For the older Phidget Lib 2.1, use version 0.1.3 of the gem.
12
+ * Version 1.0 of this gem is for Phidget Lib 2.2. For the older Phidget Lib 2.1, use version 0.1.3 of the gem.
13
13
  * This gem compiles a c extension for the phidget library, so the library must be installed and the development files must be located
14
14
  in a place that the compiler can find them. For windows the DevKit is required.
15
15
  * The gem has been tested to work on both Linux and Windows.
@@ -144,6 +144,7 @@ void Init_phidgets() {
144
144
  rb_define_const(ph_module, "CHSUBCLASS_ENCODER_MODE_SETTABLE", INT2NUM(PHIDCHSUBCLASS_ENCODER_MODE_SETTABLE));
145
145
 
146
146
  rb_define_const(ph_module, "ID_NOTHING", INT2NUM(PHIDID_NOTHING));
147
+ rb_define_const(ph_module, "ID_UNKNOWN", INT2NUM(PHIDID_UNKNOWN));
147
148
  rb_define_const(ph_module, "ID_INTERFACEKIT_4_8_8", INT2NUM(PHIDID_INTERFACEKIT_4_8_8));
148
149
  rb_define_const(ph_module, "ID_1000", INT2NUM(PHIDID_1000));
149
150
  rb_define_const(ph_module, "ID_1001", INT2NUM(PHIDID_1001));
@@ -193,7 +194,6 @@ void Init_phidgets() {
193
194
  rb_define_const(ph_module, "ID_1215__1218", INT2NUM(PHIDID_1215__1218));
194
195
  rb_define_const(ph_module, "ID_1219__1222", INT2NUM(PHIDID_1219__1222));
195
196
  rb_define_const(ph_module, "ID_ADP1000", INT2NUM(PHIDID_ADP1000));
196
- rb_define_const(ph_module, "ID_ADP1001", INT2NUM(PHIDID_ADP1001));
197
197
  rb_define_const(ph_module, "ID_DAQ1000", INT2NUM(PHIDID_DAQ1000));
198
198
  rb_define_const(ph_module, "ID_DAQ1200", INT2NUM(PHIDID_DAQ1200));
199
199
  rb_define_const(ph_module, "ID_DAQ1300", INT2NUM(PHIDID_DAQ1300));
@@ -209,9 +209,7 @@ void Init_phidgets() {
209
209
  rb_define_const(ph_module, "ID_HIN1100", INT2NUM(PHIDID_HIN1100));
210
210
  rb_define_const(ph_module, "ID_HUB0000", INT2NUM(PHIDID_HUB0000));
211
211
  rb_define_const(ph_module, "ID_HUB0001", INT2NUM(PHIDID_HUB0001));
212
- rb_define_const(ph_module, "ID_HUB0002", INT2NUM(PHIDID_HUB0002));
213
212
  rb_define_const(ph_module, "ID_HUB0004", INT2NUM(PHIDID_HUB0004));
214
- rb_define_const(ph_module, "ID_HUB0005", INT2NUM(PHIDID_HUB0005));
215
213
  rb_define_const(ph_module, "ID_HUM1000", INT2NUM(PHIDID_HUM1000));
216
214
  rb_define_const(ph_module, "ID_LCD1100", INT2NUM(PHIDID_LCD1100));
217
215
  rb_define_const(ph_module, "ID_LED1000", INT2NUM(PHIDID_LED1000));
@@ -234,7 +232,6 @@ void Init_phidgets() {
234
232
  rb_define_const(ph_module, "ID_TMP1100", INT2NUM(PHIDID_TMP1100));
235
233
  rb_define_const(ph_module, "ID_TMP1101", INT2NUM(PHIDID_TMP1101));
236
234
  rb_define_const(ph_module, "ID_TMP1200", INT2NUM(PHIDID_TMP1200));
237
- rb_define_const(ph_module, "ID_TMP1300", INT2NUM(PHIDID_TMP1300));
238
235
  rb_define_const(ph_module, "ID_VCP1000", INT2NUM(PHIDID_VCP1000));
239
236
  rb_define_const(ph_module, "ID_VCP1001", INT2NUM(PHIDID_VCP1001));
240
237
  rb_define_const(ph_module, "ID_VCP1002", INT2NUM(PHIDID_VCP1002));
@@ -242,10 +239,10 @@ void Init_phidgets() {
242
239
  rb_define_const(ph_module, "ID_DIGITALOUTPUT_PORT", INT2NUM(PHIDID_DIGITALOUTPUT_PORT));
243
240
  rb_define_const(ph_module, "ID_VOLTAGEINPUT_PORT", INT2NUM(PHIDID_VOLTAGEINPUT_PORT));
244
241
  rb_define_const(ph_module, "ID_VOLTAGERATIOINPUT_PORT", INT2NUM(PHIDID_VOLTAGERATIOINPUT_PORT));
245
- rb_define_const(ph_module, "ID_GENERICUSB", INT2NUM(PHIDID_GENERICUSB));
246
- rb_define_const(ph_module, "ID_GENERICVINT", INT2NUM(PHIDID_GENERICVINT));
247
242
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_USB", INT2NUM(PHIDID_FIRMWARE_UPGRADE_USB));
248
243
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM32F0", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM32F0));
244
+ rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM32F3", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM32F3));
245
+ rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM32G0", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM32G0));
249
246
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM8S", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM8S));
250
247
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_SPI", INT2NUM(PHIDID_FIRMWARE_UPGRADE_SPI));
251
248
  rb_define_const(ph_module, "ID_VCP1100", INT2NUM(PHIDID_VCP1100));
@@ -254,15 +251,20 @@ void Init_phidgets() {
254
251
  rb_define_const(ph_module, "ID_DCC1001", INT2NUM(PHIDID_DCC1001));
255
252
  rb_define_const(ph_module, "ID_DICTIONARY", INT2NUM(PHIDID_DICTIONARY));
256
253
  rb_define_const(ph_module, "ID_STC1001", INT2NUM(PHIDID_STC1001));
257
- rb_define_const(ph_module, "ID_USBSWITCH", INT2NUM(PHIDID_USBSWITCH));
258
254
  rb_define_const(ph_module, "ID_DCC1002", INT2NUM(PHIDID_DCC1002));
259
255
  rb_define_const(ph_module, "ID_STC1002", INT2NUM(PHIDID_STC1002));
260
256
  rb_define_const(ph_module, "ID_STC1003", INT2NUM(PHIDID_STC1003));
261
257
  rb_define_const(ph_module, "ID_DCC1003", INT2NUM(PHIDID_DCC1003));
262
258
  rb_define_const(ph_module, "ID_DST1001", INT2NUM(PHIDID_DST1001));
263
- rb_define_const(ph_module, "ID_CURLOOP", INT2NUM(PHIDID_CURLOOP));
264
259
  rb_define_const(ph_module, "ID_HUB5000", INT2NUM(PHIDID_HUB5000));
265
260
  rb_define_const(ph_module, "ID_RCC0004", INT2NUM(PHIDID_RCC0004));
261
+ rb_define_const(ph_module, "ID_DST1002", INT2NUM(PHIDID_DST1002));
262
+ rb_define_const(ph_module, "ID_HUM1001", INT2NUM(PHIDID_HUM1001));
263
+ rb_define_const(ph_module, "ID_HUM1100", INT2NUM(PHIDID_HUM1100));
264
+ rb_define_const(ph_module, "ID_MOT0100", INT2NUM(PHIDID_MOT0100));
265
+ rb_define_const(ph_module, "ID_MOT0109", INT2NUM(PHIDID_MOT0109));
266
+ rb_define_const(ph_module, "ID_MOT0110", INT2NUM(PHIDID_MOT0110));
267
+ rb_define_const(ph_module, "ID_MOT1102", INT2NUM(PHIDID_MOT1102));
266
268
 
267
269
  rb_define_const(ph_module, "INPUT_MODE_NPN", INT2NUM(INPUT_MODE_NPN));
268
270
  rb_define_const(ph_module, "INPUT_MODE_PNP", INT2NUM(INPUT_MODE_PNP));
@@ -325,6 +327,9 @@ void Init_phidgets() {
325
327
  rb_define_class_under(ph_error, "EndOfFile", ph_error);
326
328
  rb_define_class_under(ph_error, "NotImplemented", ph_error);
327
329
  rb_define_class_under(ph_error, "UnknownError", ph_error);
330
+ rb_define_class_under(ph_error, "FailSafe", ph_error);
331
+ rb_define_class_under(ph_error, "InvalidValueHigh", ph_error);
332
+ rb_define_class_under(ph_error, "InvalidValueLow", ph_error);
328
333
 
329
334
  /*
330
335
  * Document-method: getLibraryVersion
@@ -604,6 +609,15 @@ void ph_raise(int err_code) {
604
609
  case EPHIDGET_EOF:
605
610
  rb_raise(rb_const_get(ph_error, rb_intern("EndOfFile")), "End of File");
606
611
  break;
612
+ case EPHIDGET_FAILSAFE:
613
+ rb_raise(rb_const_get(ph_error, rb_intern("FailSafe")), "Failsafe condition detected");
614
+ break;
615
+ case EPHIDGET_UNKNOWNVALHIGH:
616
+ rb_raise(rb_const_get(ph_error, rb_intern("InvalidValueHigh")), "The value has been measured to be higher than the valid range of the sensor");
617
+ break;
618
+ case EPHIDGET_UNKNOWNVALLOW:
619
+ rb_raise(rb_const_get(ph_error, rb_intern("InvalidValueLow")), "The value has been measured to be lower than the valid range of the sensor");
620
+ break;
607
621
  case EPHIDGET_NOTIMPLEMENTED:
608
622
  rb_raise(rb_const_get(ph_error, rb_intern("NotImplemented")), "This functionality has not been implemented yet");
609
623
  break;
@@ -246,6 +246,7 @@ VALUE ph_log_get_sources(VALUE self) {
246
246
  const char **sources;
247
247
  uint32_t count;
248
248
  VALUE ary = rb_ary_new();
249
+ uint32_t i;
249
250
 
250
251
  ph_raise(PhidgetLog_getSources(NULL, &count));
251
252
  sources = malloc(sizeof(const char *) * count);
@@ -256,7 +257,7 @@ VALUE ph_log_get_sources(VALUE self) {
256
257
  ph_raise(rc);
257
258
  }
258
259
 
259
- for(uint32_t i=0; i<count; i++) rb_ary_push(ary, rb_str_new2(sources[i]));
260
+ for(i=0; i<count; i++) rb_ary_push(ary, rb_str_new2(sources[i]));
260
261
  free(sources);
261
262
  return ary;
262
263
  }
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Phidgets
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phidgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig DeHaan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-01 00:00:00.000000000 Z
11
+ date: 2022-10-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides a ruby interface to the phidgets library.
14
14
  email:
@@ -161,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.6.13
164
+ rubygems_version: 3.1.4
166
165
  signing_key:
167
166
  specification_version: 4
168
167
  summary: Phidgets are a set of "plug and play" building blocks for low cost USB sensing