Jump to content




[MC 1.7.10 | CC 1.65] OpenCCSensors

lua

  • You cannot reply to this topic
1334 replies to this topic

#441 jewelshisen

  • Members
  • 164 posts

Posted 16 January 2013 - 08:51 PM

View PostMikeemoo, on 16 January 2013 - 08:38 PM, said:

View Postjewelshisen, on 16 January 2013 - 01:06 PM, said:

Is there any hope of making the card ranges part of the config file like the rednet range is?


For the time being, if this card upgrade stuff goes ahead, the ability to change range by using different cards should be enough.. I'm nervous about having them configurable because I know people will just set it really high then produce a load of bug reports when it starts to become slow! :)/>

However, I know other mods do have that kinda thing configurable (such as nuclear explosion strength in ic2), so configurable ranges is a possibility, but I'll leave that decision to Cloudy..

For the time being it's not something I'll be focusing on. Plenty of other stuff to do :)/>

Ah ok then. I ask because I know I HATED the limits that CCs Rednet modems had until i modded the config file. Not sure how badly it would lag at long range. Need somebody to test it?

#442 CoolisTheName007

  • Members
  • 304 posts

Posted 17 January 2013 - 12:38 AM

View Postjewelshisen, on 16 January 2013 - 08:51 PM, said:

View PostMikeemoo, on 16 January 2013 - 08:38 PM, said:

View Postjewelshisen, on 16 January 2013 - 01:06 PM, said:

Is there any hope of making the card ranges part of the config file like the rednet range is?


For the time being, if this card upgrade stuff goes ahead, the ability to change range by using different cards should be enough.. I'm nervous about having them configurable because I know people will just set it really high then produce a load of bug reports when it starts to become slow! :)/>

However, I know other mods do have that kinda thing configurable (such as nuclear explosion strength in ic2), so configurable ranges is a possibility, but I'll leave that decision to Cloudy..

For the time being it's not something I'll be focusing on. Plenty of other stuff to do :)/>

Ah ok then. I ask because I know I HATED the limits that CCs Rednet modems had until i modded the config file. Not sure how badly it would lag at long range. Need somebody to test it?
I'm sure that after some limit is starts lagging, because the way things are now, when you ask for targets, the sensor checks, for every block in range, if that block matches the target. An alternative would be the ability to point your sensor to a certain smaller area; then you would be able to piece a large area in smaller areas, and then point the sensor to each of them and getting the targets for the smaller areas.

#443 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 17 January 2013 - 01:46 AM

Posted Image

#444 spardha

  • New Members
  • 12 posts

Posted 17 January 2013 - 02:32 AM

View Postabihoooo, on 10 December 2012 - 09:43 PM, said:

Here's my build so far using the ic2 and inventory sensors. I used peripheral cables so I can have tons of sensors connected.

Posted Image

What cables are you using here??? I'm trying to have a sensor closer to my MFSU and the computer further than 3 blocks away.

Thanks

#445 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 17 January 2013 - 02:48 AM

Those are Xfell's peripheral cables. You can find them in this forum section.

#446 spardha

  • New Members
  • 12 posts

Posted 17 January 2013 - 03:55 AM

View PostOrwell, on 17 January 2013 - 02:48 AM, said:

Those are Xfell's peripheral cables. You can find them in this forum section.

Thanks for the info... Can i use these with the standard "sensor view" program? I don't know how to code. I've been trying to learn the last few days but it beyond me :~(

UPDATE

I have got the example from OpenCCsensors:
os.loadAPI("ocs/apis/sensor")
local prox = sensor.wrap("left")
print(textutils.serialize(prox.getTargets()))

and edited it with:

os.loadAPI("ocs/apis/sensor")
local prox = sensor.wrap("left:red")
print(textutils.serialize(prox.getTargets()))

And got an output... :lol: now to figure out how to write a full program.

#447 Lordmau5

  • Members
  • 22 posts

Posted 17 January 2013 - 04:43 AM

How did you got it to work with Xfell's peripheral cables?

I don't get any colour there lol...


Btw. i don't even know how to use it at all :D

#448 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 17 January 2013 - 04:55 AM

You can probably get it to work with sensorview, but you'll need to make a few alterations to it.

First, copy it from the default location to your own copy:

"cp /ocs/programs/sensorview /sensorview"

next, open it up:

"edit sensorview"

The very top line looks like this:

local sideNames = rs.getSides()

Change that to:


local sideNames = {"left:red", "right:green" }

(or add as many as you like in there)

Now save the program and run your new version.

this SHOULD work. But I havent tested :)

#449 spardha

  • New Members
  • 12 posts

Posted 17 January 2013 - 05:19 AM

View PostLordmau5, on 17 January 2013 - 04:43 AM, said:

How did you got it to work with Xfell's peripheral cables?

I don't get any colour there lol...


Btw. i don't even know how to use it at all :D

The side with the sensor you have to use a dye on the cable.

#450 spardha

  • New Members
  • 12 posts

Posted 17 January 2013 - 05:22 AM

View PostMikeemoo, on 17 January 2013 - 04:55 AM, said:

You can probably get it to work with sensorview, but you'll need to make a few alterations to it.

First, copy it from the default location to your own copy:

"cp /ocs/programs/sensorview /sensorview"

next, open it up:

"edit sensorview"

The very top line looks like this:

local sideNames = rs.getSides()

Change that to:


local sideNames = {"left:red", "right:green" }

(or add as many as you like in there)

Now save the program and run your new version.

this SHOULD work. But I havent tested :)

Amazing it works !!!! :D :D :D

Thanks for the post, but i have been messing trying to code my own program with no success but I think I its got me hooked so I will use this and try to make my own programs.

#451 Lordmau5

  • Members
  • 22 posts

Posted 17 January 2013 - 06:03 AM

Ah the dye was missing, ty ;)

#452 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 17 January 2013 - 06:36 AM

View PostMikeemoo, on 17 January 2013 - 04:55 AM, said:

You can probably get it to work with sensorview, but you'll need to make a few alterations to it.

First, copy it from the default location to your own copy:

"cp /ocs/programs/sensorview /sensorview"

next, open it up:

"edit sensorview"

The very top line looks like this:

local sideNames = rs.getSides()

Change that to:


local sideNames = {"left:red", "right:green" }

(or add as many as you like in there)

Now save the program and run your new version.

this SHOULD work. But I havent tested :)/>/>

Wow, that was convenient! The way sensorview is coded, it doesn't actually care what the side names are. I certainly hadn't thought of this modification to it, though! I am glad it's relatively easy to modify for this sort of thing.

#453 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 17 January 2013 - 07:47 AM

Whoever coded sensorview is a geeenius! ;D

#454 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 08:02 AM

View PostLyqyd, on 17 January 2013 - 06:36 AM, said:

View PostMikeemoo, on 17 January 2013 - 04:55 AM, said:

You can probably get it to work with sensorview, but you'll need to make a few alterations to it.

First, copy it from the default location to your own copy:

"cp /ocs/programs/sensorview /sensorview"

next, open it up:

"edit sensorview"

The very top line looks like this:

local sideNames = rs.getSides()

Change that to:


local sideNames = {"left:red", "right:green" }

(or add as many as you like in there)

Now save the program and run your new version.

this SHOULD work. But I havent tested :)/>/>

Wow, that was convenient! The way sensorview is coded, it doesn't actually care what the side names are. I certainly hadn't thought of this modification to it, though! I am glad it's relatively easy to modify for this sort of thing.

Just tested it. If you try and use the left/right keys and have only one side it will give you an error

#455 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 17 January 2013 - 08:05 AM

I can probably fix that, but it's obviously a (very) low priority. I'll poke about sometime this week, I think.

#456 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 08:15 AM

View PostLyqyd, on 17 January 2013 - 08:05 AM, said:

I can probably fix that, but it's obviously a (very) low priority. I'll poke about sometime this week, I think.

Oh i know it's a low priority bug! I just wanted to let you know it is there. :-)

#457 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 08:52 AM

Is it possible to send the sensor data over the rednet network and if so, how would you code it for a sensor turtle?

#458 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 17 January 2013 - 09:13 AM

View Postjewelshisen, on 17 January 2013 - 08:52 AM, said:

Is it possible to send the sensor data over the rednet network and if so, how would you code it for a sensor turtle?

Anything is possible! Although, this isn't really the place for questions like that as it's more of a generic coding question. Sending sensor data over the network isn't any different to sending any other data over a network - You're best off asking in the "Ask a pro" section :)

#459 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 09:42 AM

Got it. Wanted to ask here because i am not sure how to code it so it is recieved in a usable fashion. I want to have a sensor turtle broadcast the data back to my main base.

#460 jewelshisen

  • Members
  • 164 posts

Posted 17 January 2013 - 10:42 AM

Hit a snag. The sensor turtle says the card is not there. I have the card in the selected slot but i get nothing. Am i missing a step?





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users